++ Url Linking

You may enter URLs to websites or local files into your document.  To
open the link double click on it or press the Ctrl-L. If you drag a
file from Windows explorer onto wikidPad a link will be created for
you.

Example:

http://www.google.com/ 
https://somewheresecure.com
file:///C:/Documents%20and%20Settings/joeshmoe/readme.txt
ftp://ftp.whereever.com/

To create an absolute URL to a file you can also use "Add file URL" in "Editor" menu and choose the desired file in file dialog.

To show a different title in the HTML preview/export as a link, use e.g.

[ftp://ftp.whereever.com/|Go somewhere]

Switch to preview to see the "Go somewhere" only. You can also use an image URL (see below) as title to show a clickable image:

[https://somewheresecure.com|rel://files/testimg.gif>r40%]

If the image URL contains spaces, enclose it in an additional pair of brackets:

[https://somewheresecure.com|[rel://files/spaced testimg.gif]]

See LinkTitle for more details about titles.


++ Relative URLs
You can create URLs which are relative to the wiki directory. These start with rel:// followed by the relative position. For HTML export the rel:// is removed to create a relative HTML link (without protocol) which is adapted to new position. For HTML preview they are converted to "file:" URLs.

You can drag a file from Windows Explorer while holding shift key to create a relative URL (in default configuration). For files ending with ".wiki", the "wikirel:" protocol is used instead of "rel:".

Example:

rel://../above/andBelow.txt


++ Converting between relative and absolute URL
If you right-click on a "file:"/"wiki:" or "rel:"/"wikirel:" URL and choose "Convert Absolute/Relative File URL" you can change an URL from one type to the other. Alternatively you can place the text cursor in such an URL and select from regular menu "Format"->"Convert"->"Absolute/Relative File URL".

Converting a relative URL to an absolute one is always possible, but there may be absolute URLs (especially on Windows if pointing to a different drive than the one the wiki is on) that can't be converted to relative URLs. In this case nothing happens.


++ File storage
You can also copy files into a subdirectory of the wiki directory from within WikidPad. See [FileStorage] for details.


++ Images
If an URL file ends with ".jpg", ".gif", ".png", ".tif" or ".bmp", the URL is automatically shown as an image in preview and HTML export (an image in the file storage with relative URL is copied to a subdirectory "files" in the export destination directory). The URL can be absolute or relative and can point into the file storage.

Example (switch to preview to see the picture):

rel://files/testimg.gif

To show all such URLs as links instead, open "Options" dialog, page "HTML preview/export" and check "Show pics as links in preview" or "Show pics as links in export" or set it temporarily in the export dialog.

For controlling of individual URLs, see "URL Appendix" below.


++ Wiki: URLs
To link from one wiki to another you can create links beginning with "wiki:", e.g.

wiki:///C:/Documents%20and%20Settings/foowiki/foowiki.wiki


You can add parameter "page" to specify the wiki page to open (replace spaces by "%20"):

wiki:///C:/Documents%20and%20Settings/foowiki/foowiki.wiki?page=ThePage%20with%20spaces

You can also specify an anchor on the page to jump to:

wiki:///C:/Documents%20and%20Settings/foowiki/foowiki.wiki?page=ThePage%20with%20spaces&anchor=here


To create these URLs you can also use in menu "Wiki Page" the function "Copy URL to clipboard" and then paste the URL where you like.

The above menu entry is also available in context menus for wiki word tree items, tabs and for "anchor: ..." lines in the editor. In the last case the URL contains also the anchor you clicked on.


++ URL Appendix
You can control details of URL presentation, especially for images, by using an URL appendix. This consists of a '>' character directly after the URL (no space) and some code characters which can be delimited by semicolons. The following codes are defined:

    i Show URL as image, even if it has none of the default suffixes
    l Show URL as link. 'i' and 'l' are mutually exclusive.
    s Set size of an image, following the code is the width and height in pixels or
      as percentage of *surrounding* space on page (according to HTML standard),
      delimited by 'x' (e.g. '200x300', "60%x70%")
    r Set size in percent relative to image size (e.g. "50%x30%"). Only one given
      percent value is used for width and height ("40%" is same as "40%x40%"). No value
      at all is interpreted as "100%x100%".
    a Set alignment of image, the following character defines which alignment (*t*op, vertically
      *m*iddle, *b*ottom, *r*ight or *l*eft). This setting is not respected by the internal preview.
    p Set *rel*ative or *abs*olute linking on HTML export for "file:" and "rel:" links.
      If relative link is not possible, absolute link is used.
      Use *rnr* (=relative, no relocation) if you want a relative link which is not modified on
      export in any way (compatibility to behavior of previous WikidPad versions)


Examples:

Control size and alignment:
rel://files/testimg.gif>s50x50;al

Show the URL as link:
rel://files/testimg.gif>l

Relative size:
rel://files/testimg.gif>r110%x60%
