# Select a path, press CTRL-U and it will turn into a clickable URL.
# Install: Put the source below into "WikidPad/user_extensions/"
# and restart WikidPad.

import urllib
WIKIDPAD_PLUGIN = (("MenuFunctions",1),)
def describeMenuItems(wiki):
	return ((URLifyFile, "URLify file\tCtrl-U", "URLify file"),)

def URLifyFile(wiki, evt):
	text = wiki.getActiveEditor().GetSelectedText()
	url = urllib.pathname2url(text)
	wiki.getActiveEditor().ReplaceSelection("file:%s" % url)	
Last modified 9 years ago Last modified on Mar 18, 2010 7:38:34 PM