parent nodes: ChangeLog | ChangeLog2006 | ChangeLog2008 | ChangeLog2009 | ExternalGraphicalApplications | OptionsDialog | WikiDocumentAttributes | WikidPadHelp | WikiStructureGraphs
Insertions
Insertions allow to insert some dynamic text into preview and HTML export of a page. This text can either be the content of another page or a list of wikipage links to pages which are parents or children of a page or to pages which form the result of a saved search.
To insert, for example, the content of the IncrementalSearch page, write:
Incremental Search
When in a document type CTRL-F or F3 to start an incremental search in
the left field of the status bar.
When in incremental search mode anything you type becomes a search
string, and as you type you are brought to matches in the current
text. Typing CTRL-F, or F3 again or typing CURSOR DOWN or PAGE DOWN
will "Search Next" while SHIFT-F3, CURSOR UP or PAGE UP search
backwards.
To exit incremental search mode type ENTER.
Incremental search supports regex. For example: To match the
word "incremental" or the word "search" in this document, type:
CTRL-F
incremental|search
Then type CTRL-F again to cycle through the matches.
Further details of the behavior of inc. search:
Ctrl-F while text is selected in editor copies it to search
field up to the first newline or up to 30 characters
F3 starts search field with last search entered
Search starts at cursor position (1.8beta5 and prior started
always at page beginning)
ENTER terminates search and keeps last found text selected (if any)
ESC terminates search and goes back where search began
Clicking outside of the search field terminates search
If search pattern is found search field is green
If search pattern is not found search field is yellow
If search pattern is an invalid regex, color doesn't change
In the options dialog, page "Searching" there is also an option
"Delay before auto-close". Entering a number greater 0 denotes the
number of seconds of inactivity before incremental search is closed
automatically. 0 means "wait forever".
[icon: lens]
If you switch now to the preview, you will see the content of the IncrementalSearch page above, instead of the insertion tag.
Syntax
The tag begins always with '[:' then comes the insertion key, then a colon and the insertion value,
after that there may be appendices, separated by semicolons, to describe the way of presentation in more detail. The tag is closed by a closing bracket.
In the example above, "page" is the insertion key, "IncrementalSearch" is the value.
The value and appendices can be quoted (enclosed by quotation symbols) if they shall contain special characters or newlines. A quotation symbol is an arbitrary number of one of the quotation characters ", ', / or (double quotation mark, single quotation mark, slash or backslash). The starting and ending symbols must be the same. Examples for quotation symbols are:
"
'''
//
/////
\
The above insertion example can therefore be written as:
[:page: "IncrementalSearch"]
[:page: '''IncrementalSearch''']
[:page: //IncrementalSearch//]
[:page: /////IncrementalSearch/////]
[:page: \\IncrementalSearch\\]
The following keys and values are built into WikidPad (further are possible by plugins):
page shows the content of the existing wiki page which is
given as insertion value. If it contains an appendix
"adjheading" it adjusts the heading levels in the inserted page
to the level of inserting page
rel lists all wiki words related to this page in the way
described by the value:
parents: all parents of the page
children: all children (= all wiki links) of the page.
With appendix "existingonly" only the really existing
pages are listed
parentless: all parentless pages. The list is
independent from the page containing the insertion tag.
undefined: all undefined wiki word links. The list is
independent from the page containing the insertion tag.
back: go back in history of WikidPad tab (or browser
on export)
savedsearch lists all wiki words found by the saved search
with the name given as value.
toc shows a little table of contents with the headings of
the current page. In HTML preview/export you can click on
the lines to go to the actual headings. The value of this
insertion must be empty.
iconimage shows the icon whose name is given as value.
You can use menu "Format"->"Icon Name" to find the name of
an existing icon.
eval Evaluate the given Python expression and handle its
result as if it replaces the insertion. You must switch on
the appropriate option "Process insertion scripts" on the
"Security" options page to make it work.
self Shows the name of the current page.
For insertion tags which produce lists of wiki links (all but the "page" and "eval" insertion), you can also have the appendix "columns 123" where 123 stands for the number of columns the list should have. By default, there is only one column.
By default such a multi-column table is sorted rightwards:
A B C
D E F
G H I
With the appendix "coldir down" it is sorted downwards:
A D G
B E H
C F I
Examples
At first a few wiki links to demonstrate the functions: (KeyBindings, DeadLink, DeadLinkToo, ScratchPad, TextBlocks)
It is recommended to switch to preview to see the effect of the tags:
[:rel: parents]
ChangeLog |
ChangeLog2006 |
ChangeLog2008 |
ChangeLog2009 |
ExternalGraphicalApplications |
OptionsDialog |
WikiDocumentAttributes |
WikidPadHelp |
WikiStructureGraphs |
[:rel: children]
DeadLink |
DeadLinkToo |
IncrementalSearch |
KeyBindings |
ScratchPad |
TextBlocks |
[:rel: children;existingonly;columns 2]
[:rel: children;existingonly;columns 2;coldir down]
[:savedsearch: nanny; columns 4] (all pages containing "any")
[:toc:]
[:eval:"5+6"]
[Allow evaluation of insertions in "Options", page "Security", option "Process insertion scripts"]