·
Supported Text Rules ·
Unsupported text rules ·
Features of an edit box (under Windows)
Supported Text Rules
Introduction
In a Wiki there are (special) characters like # * ; : = and their position in a line applied to format text. The Wiki mark-up is converted at server site into HTML. If you edit a page again, you will see exactly what you typed: text with Wiki mark-up chars - not HTML. It will take beginners roughly 20 minutes to get used to write the Wiki mark-up chars.
To create a new page, just type its name on an existing page inside a Wiki link (see below). If the page does not exist, PWP will display the name with a question mark link (?). A simple click on this link will create the page.
Plain HTML Input
Per default, PWP is configured NOT to accept HTML input. The chars & > < become silently converted into HTML entities '&...;'. You can also configure PWP to accept plain HTML as input. Which HTML tags are allowed, is defined in the config file. PWP uses strip_tags() to get rid of unwanted HTML. If you want to use < and > in a mathematical meaning, simply leave a space on either side or the strip_tags() function may strip whole parts of the text! Signs like << and >> are not allowed if PWP is configured to accept HTML input.
Sample of Wiki Text
A sample of Wiki mark-up can be found among the uploaded files: »file:text_rules_test.txt. Just copy'n'paste it's contents into the edit box of a Wiki page.
Inkine Markup and Paragraphs
- Fat, italic and underline is achieved by enclosing single words or groups of words in '++', '//' and '__'. The alternative syntax of two single quotes '' for italic and three ''' single quotes for fat text on each side of the word(s) is also supported. Consequently, words between five singel quotes ''''' become fat and italic.
- Enclosing one or more words in between double hyphens creates a strike through layout: --This is done.-- gets translated into
This is done.
- You can use super9 and subi by enclosing the text in '^9^' for super and '^^i^^' sub lined. Left of the first '^' must be a word character or a parenthesis.
- One hyphen directly followed by an underscore '-_' marks a forced line break BR. Usually, the editor does't take care of line breaks. It's the task of the visitor's browser to wrap HTML at the end of the screen.
- An empty line is converted into a paragraph P. There must not be tabs or spaces on such a line. PWP will not create closing paragraph tags.
- Four or more hyphens '-' at the beginning of a line will become a horizontal ruler HR.
Headings
- Headings are defined by writing an equal sign '=' at the beginning of a line. One '=' will result in a heading H1, six '=' in H6. Headings must not contain a double quote, a single quote is ok. Otherwise the table of contents will not work. The heading may be followed by 0..N equal signs at the end of the line. Just the equal signs in front of the heading determine its level.
PWP creates a named anchor for each heading. See in the link section below how to address them.
Block Markup and Block Alignment
- A line starting with a colon ':' will be indented by BLOCKQUOTE; two ':' will indented further; three and more ':' are not supported.
- Lines starting with '~' will be centred; '~~' causes a right alignment. Using this, you can center plain text, images, headings and table cell content.
In order to center a multiline block like tables, comments, blockquote, etc. one has to use the char '~' on an empty line above and below the block - and of course in front of each line of the block, too. Alignment is done using a DIV.
Line Concatenation
- In the case you want to use multiple lines for one list item in the edit view you can use line concatenation. Just press return and start the next line with a dot '.'. This line gets appended to its predecessor. Line concatenation also works within every other Wiki mark-up section. It provides a clearer view of the page structure for the editor. Use this feature often.
Lists
New in 1.5.0: PWP now supports three list levels. All three list types can be mixed at different levels.
- One up to three asterik '*' at the beginning of a line mark an unnumbered list of the first, second or third level. Deeper levels are not supported.
- Likewise, '#' or '##' or '###' forms a numbered list.
- A definition list is made by using ;Term:Definition at the beginning of a line. And as expected, ;;SubTerm:SubDefinition will result in a second level definition list.
Preformatted Text and Source Code
- A comma ',' at the beginning of a line will result in preformatted text PRE. Alternatively you can use a space ' ' at the beginning of a line. However, a space is not visible and an editor cannot distinguish if there should be a paragraph or preformatted text.
- One can combine preformatted text with the Wiki escape sequence described below to force a whole block of source code into a preformatted section: ,! - source code - !.
Links and Images
Basically, links and images are identical from PWP's point of view. Both are internet addresses. An image is distinguished from a link just by its extension, e.g. '.gif'. If PWP finds an image extension within an address, it uses the image tag IMG instead of the link tag A HREF.
- A word between two square bracket pairs '[[WikiPage]]' will mark a link to a Wiki page. On a click, the page gets created if it does not exist. The usual Wiki syntax of MixedCase names is not supported. You will get a different link text if you separate the Wiki page name by a bar '|' or by a space ' ' from the link text, like: [[WikiPage|LinkText]].
Inside Wiki links you may include icons by using a variable: [[WikiPage|{{IconVar }} Text]] or new in 1.5.0 an image link: [[WikiPage|[/icon_image.gif My Icon] ]] (Note the space between the brackets.)
New in 1.5.0 PWP supports anchors or targets on Wiki pages: Each heading and each definition term in a definition list become a named anchor. In order to link to such an anchor, use the syntax [[MyPage#Definition]] . This feature does not work if the heading or definition consists of mor than one word separated by spaces.
New in 1.5.0 All links pointing to files modified within the last three days will be marked with an asterik*.
There are three choices for linking external content and including images:
- Inline Links are done by typing a fully qualified URL, like »http:// or »mailto: Images will be recognized automatically.
- Links can also be achieved by enclosing an URL or a relative path into square brackets '[/myPath/myfile.html]'. Here you may specify an alternative link text separated by a space or a bar '|': '[/myPath/myfile.html MyFile]'. This square bracket syntax is useful for relative URLs not starting with any protocol like »http:// . Again, images will be recognized and included automatically. New in 1.5.0 In order to link to an image but not to include the image in the Wiki page, use a hyphen as first character after the opening square bracket: '[-/my_image.gif My Image]'.
- Changed in 1.5.0 InterWiki links act like a macro: You type a short text defining the target website (or local path) and a page name. PWP expands this link to an URL or embeds an image if the page name points to an image file ending on 'gif', 'jp(e)g' or 'png'. Use [{name|page}] to get such a link. Using InterWiki links, you can link uploaded files and images without having to care about the server name upon moving your data. As described above, you may link to images instead of including them with the text rule: [-{name|image.gif}]
Note: InterWiki targets are defined in your config file. The old syntax [wiki:name|page] or shorter [w:name|page] is deprectaded but still supported.
Comments, Wiki Markup Escaping
- Put an exclamation mark '!' at the beginning of a line to mark a comment. This may be useful to track changes or to write annotations into the text. Comments may be stripped off in static files (see config file). Comments are also achieved by using a DIV tag.
- There is a special kind of comment: '!?' at the beginning of a line marks this page as to be "under construction". Its contents will not become published on exporting static pages. Instead, in order to avoid dead links, either the message following '!?' will be appear on the static page or - if there is no message - a pre-configured message is shown on the static page. '!?' must be a single line comment whereas the usual syntax of a comment '!' may be used as a multiline block.
- PWP is able to escape text passages. Text within an exclamation mark followed by an hyphen: '! - +[[WikiMarkup]]+ - !' won't become translated into HTML mark-up. Note that the sample leaves a space between the two signs which must not appear in 'real' use. Escaping text is an 'inline' issue, this type of comment can be applied anywhere within the text, just like fat and italic. It may also span multiple rows. In order to paste some source code in a Wiki page, use ',!-' at the beginning of a new line an close the comment below the source code.
- One more type of comments is left, the invisible comment: '! -- invisible text -- !'. This comment will be visible for an editor only, it gets stripped of in dynamic and static pages. The syntax is close to HTML comments. Again, note the spaces required to display the sample.
- There is a special kind of an editor comment: ! - -(+)- - ! marks a position where "QuickEdit" can insert new text. Only one such comment is allowed in a page. Again, there are spaces in the sample.
Variables
- Changed in 1.5.0 Variables are included inside a Wiki page using the syntax '{{Name}}'. A variable gets replaced by its contents at the moment of the page delivery. Variables may contain text, HTML and even Wiki mark-up. The contents of a variable is defined in your config file. See also UserManual for more details and samples. The old syntax '{v:Name}' or '{var:Name}' is deprecated but supported as well.
- New in 1.5.0 PWP provides four invisible pre-defined variables for a multi column layout: {{||--}} opens an invisible table, {{||}} shifts a cell, {{--}} shifts a table row and {{--||}} closes a table . It is recommended (but not required) to fill each row with the same number off cells.
Tables
- Changed in 1.5.0 '||-' will start a row of table heads TH, '-||' closes it. TH cells are separated by '-||-'. One table row of simple cells (TD) is done by typing '|| cell#1 || cell#2 ||'.
- Tables cannot contain lists, comments, headings, etc. They are just a simple tool for arranging text blocks or numbers.
- New in 1.5.0 Within both, cells and heading cells, the contents may be forced to center or right layout using the same text rule as described above: '||~' centers a table cell and '||-~~' creates a right aligned table heading cell.
- The old syntax required explicit opening and closing of tables: '||--' at the first line and '--||' at the last line in order to close a table. This is deprectaded but supported as well.
Unsupported text rules
- MixedCase (also called CamelCase) linking is not supported. (Personally, I do not like the idea of MixedCase linking. We've got to many mixed case expressions in your writing, like product or company names, and, of course source code samples.)
- Lists with a depth of four levels and deeper. (Would be quite difficult to read, anyway. Consider using headings for the first list levels instead.)
- Lists with the 'TAB*' syntax. (It's quite hard to enter tabs in browser edit boxes!)
Features of an edit box (under Windows)
- CTRL-C copies highlighted text into the clipboard.
- CTRL-X cuts highlighted text and leaves a copy of it in the clipboard.
- CTRL-V pastes the text contained in the clipboard.
- CTRL-A highlights all text within the edit box.
- CTRL-F brings up a text search.
- CTRL-Z makes the last action undone. You can undo more than one action by pressing CTRL-Z more than once.
- CTRL-Y works as a kind of redo. It makes the last CTRL-Z undone. (Got confused?)