Version:10 mar 2013
Questions answered by this recipe
- How can I use a logical, clean and simpler markup inside pmWiki?
- How can I use txt2tags tags or reuse txt2tags documents inside pmWiki pages?
This recipe adds txt2tags formatting to the pmWiki markup.
Most txt2tags tags are translated to their pmWiki equivalent and then passed through the standard PmWiki engine.
- Download the following file: txt2tags.phpΔ and save in your /cookbook directory.
- Add the following line into your local/config.php script:
If you wish to use the GUI icons for edition (included in pmwiki), add also:
And if you want the full GUI icons, download t2tguiedit.zipΔ and unzip it into your root
$FarmD directory (it will expand files into cookbook and pub)
It will look like this when editing some text:
In the case the t2tguiedit folder is not found, it will no longer fallback to the default guiedit icons.
For your users, you should edit the /pmwiki/index.php/Site/EditQuickReference and add for example:
Here is the current state of what is working and what is not:
- Title level : works
- Numbered Title level : replaced by Title level
- Table of content based on titles : works (you must use Cookbook/PageTableOfContents with it.)
- A paragraph is made by one or more lines. A blank line separates them. : seems to work. Default in pm wiki.
- A percent sign for comments : works (use one whitespace after %)
- For beautifiers we have bold and italic. : works
- There is also underline, strike and monospaced. : works
- a list of items : works
- More indent opens a sublist : works (limited to level 3 lists)
- Two blank lines close all the lists. : one line break is enough to close the list.
- Change the hyphen by a plus
- And you have a numbered list : works
- Definition list : not working very well
- A quoted paragraph is prefixed by a TAB. : not working (not relevant on a web form)
- verbatim area : works
- Verbatim line prefixed with 3 backquotes. : works
- Tables : not working well
- single external url links : works (pmwiki behavior)
- commented url links : works
- txt2tags style inside links (without http) : works
Sample page showing this:
you can edit the sandbox linking from this page with the password "pmwiki"
User notes +1: If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.