source: branches/mbutscher/work/WikidPadHelp/data/TextBlocks.wiki @ 195

Last change on this file since 195 was 178, checked in by mbutscher, 11 years ago

2.0preAlpha (internal)

Works so far, now editing help wiki.

File size: 3.5 KB
Line 
1++ Text Blocks
2
3In the "Edit" menu you have a submenu "Paste Textblock" which you can modify to contain arbitrary blocks of text you use often and which you can insert or append everywhere by choosing the appropriate menu item.
4
5To modify the menu you have to edit one of two special wiki pages, so-called "functional pages" which are located below the "Func. pages" node which is a child of the "Views" node in the tree on the left.
6
7Functional pages behave similar to normal wiki pages but can't be renamed or deleted. They control some behavior of a wiki or the whole application.
8
9The "Global text blocks" page applies application-wide to all wikis, while "Wiki text blocks" can be set individually for each wiki.
10
11The menu is updated after saving (manually or automatically) one of the pages.
12
13
14+++ Where are the files?
15
16If you want to edit them with a text editor, you can find the global text blocks file below your configuration directory which is either your home directory or the directory where you installed WikidPad. Your configuration directory can also be found by opening the "About" dialog (menu "Help") and scrolling down to bottom.
17
18The file is named "[TextBlocks].wiki" and is located in a directory ".WikidPadGlobals" which is in your configuration directory (the dot prefix is a Linux/Unix convention). If it does not exist when starting WikidPad, a default version is created automatically.
19
20The wiki-specific file is (for "Original" database types only) in the "data" directory of your wiki and has the name "wiki%2FTextBlocks.data". For the "Compact" database type there exists no separate file.
21
22After you have modified and saved one of the files, you can see the changes when selecting "Reread text blocks" at the bottom of the "Text blocks" menu. This reads the files again and rebuilds the menu.
23
24
25
26+++ File format
27
28(If you read this in HTML preview, you should switch back to edit mode to see it correctly.)
29
30Each line represents an own entry of the menu. The indentation controls if it is in the "Text blocks" menu itself or in a submenu.
31Each entry consists of a combination of title, flags and/or content. The title is shown in the menu, the content is inserted or appended when choosing the menu item, the flags control further details.
32
33
34Examples:
35
36=This will be inserted
37
38The equal sign is always necessary! After the equal sign begins the content which can contain escape sequences with backslash, so you can write \n to insert a newline. The title is deduced from the beginning of the content. When selecting the menu item, content is inserted at cursor position.
39
40
41
42insert=This will be inserted
43
44Same as before but the title in the menu is now "insert".
45
46
47
48append;a=This will be appended
49
50Similar as before but the entry has the "a" flag (currently the only existing one) which means the content is appended to the end of the current wiki page.
51
52
53
54;a=This will be appended
55
56Same as before but title is omitted here and therefore deduced from content.
57
58
59Submenu title=
60
61Title without content, only meaningful as title of a submenu whose items follow indented.
62
63
64A complete example with one submenu (add these lines to one of the pages or one of the "[TextBlocks].wiki" files to see the effect of it):
65
66
67;a=Something interesting at the end
68Submenu title=
69    item title=Something to insert
70    escaping=Escaping new lines as \\n...\n\n\nworks
71    all together;a=Show flag to append and item title \nand escape to new line
72
Note: See TracBrowser for help on using the repository browser.