home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 June / PCWorld_2007-06_cd.bin / temacd / wikipad / WikidPad-1.9beta2.exe / {app} / WikidPadHelp / data / TextBlocks.wiki < prev    next >
Encoding:
Text File  |  2006-04-15  |  3.5 KB  |  74 lines

  1. ∩╗┐++ Text Blocks
  2.  
  3. In the "Editor" menu you have a submenu "Text blocks" 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.  
  5. To 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.  
  7. Functional 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.  
  9. The "Global text blocks" page applies application-wide to all wikis, while "Wiki text blocks" can be set individually for each wiki.
  10.  
  11. The menu is updated after saving (manually or automatically) one of the pages.
  12.  
  13.  
  14. +++ Where are the files?
  15.  
  16. If 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.  
  18. The 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.  
  20. The wiki-specific file is (for "Original" database types only) in the "data" directory of your wiki and has the same name "[TextBlocks].wiki". For the "Compact" database type there exists no separate file.
  21.  
  22. After 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 "[TextBlocks].wiki" 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.  
  30. Each line represents an own entry of the menu. The indentation controls if it is in the "Text blocks" menu itself or in a submenu.
  31. Each 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.  
  34. Examples:
  35.  
  36. =This will be inserted
  37.  
  38. The 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.  
  42. insert=This will be inserted
  43.  
  44. Same as before but the title in the menu is now "insert".
  45.  
  46.  
  47.  
  48. append;a=This will be appended
  49.  
  50. Similar 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.  
  56. Same as before but title is omitted here and therefore deduced from content.
  57.  
  58.  
  59. Submenu title=
  60.  
  61. Title without content, only meaningful as first entry of a submenu to define the submenu title.
  62.  
  63.  
  64.  
  65. A 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):
  66.  
  67.  
  68. ;a=Something interesting at the end
  69.     Submenu title=
  70.     item title=Something to insert
  71.     escaping=Escaping new lines as \\n...\n\n\nworks
  72.     all together;a=Show flag to append and item title \nand escape to new line
  73.  
  74.