-
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.
Plain text
- 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. (Won't work if the mark-up char is the last non-space char in the text. In most cases follows a dot '.' anyway.)
- You can use SUP9 and SUBi by enclosing the text in '^' for super and '^^' sub lined. Left of the first '^' must be a word character or a bracket. ^^i^^ will not work.
- One hyphen directly followed by an underscore '-_' marks a line break BR.
- 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.
- A line starting with a colon ':' will be indented by BLOCKQUOTE; two ':' will indented further; three and more ':' are not supported.
- 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. A space is not visible and an editor cannot distinguish if there should be a paragraph or preformatted text.
- 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. New in 1.4.0 The heading may be closed by 0..N equal signs at the end of the line. Just the equal signs in front of the heading determine its level.
Alignment and comments
- Lines starting with '~' will be centred; '~~' causes a right alignment. Using this, you can center plain text, images and headings. In order to center a multiline block like tables, comments, blockquote, preformatted text, 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.
- Put an '!' 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 done by using a DIV tag.
- New in 1.4.0 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 creating 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.
- New in 1.4.0 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.
- New in 1.4.0 One more type of comments is left, the editor 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.
- New in 1.4.0 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.
Lists and line concatenation
- One or two '*' at the beginning of a line marks an unnumbered list of the first or second level. Deeper levels are not supported.
- Likewise '#' or '##' forms a numbered list.
- Changed in 1.4.0 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.
- New in 1.4.0 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.
Links and Images
- A word between two square brackets pairs '[[WikiPage]]' will mark a link to a Wiki page. On a click, the page gets created if it does not exist. The usual syntax of MixedCase names is not supported. You will get a different link text if you separate the Wiki page name by a '|' or by a space ' ' from the link text, like: [[WikiPage|LinkText]]. Inside Wiki links you may include icons by using a variable: [[WikiPage|{ v:IconVar } Text]].
There are three choices for linking external contents 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 '|'. This syntax is useful for relative URLs not starting with any protocol like http:// . Again, images will be recognized and included automatically.
- 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 [wiki:name|page] or shorter [w:name|page] enclosed in single square brackets 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. Note: InterWiki targets are defined in your config file.
Variables
- New in 1.3.7 Variables are included inside a Wiki page using the syntax '{v:Name}' or '{var: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.
Tables
- Tables are opened done by typing 'll--' at the first line. '--ll' on a single line closes a table. 'll-' will start a row of table heads TH, '-ll' closes it. TH cells are separated by '-ll-'. One table row of simple cells (TD) is done by typing 'll cell1 ll cell2 ll'. Note: this sample uses the letter 'l' but you have to type the bar '|'.
- Tables cannot contain lists, comments, headings, etc. They are just a simple tool for arranging text blocks or numbers.
Unsupported text rules
- MixedCase 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.)
- Table cell alignment is not supported.
- Lists with a depth of three levels and deeper.
- Lists with the 'TAB*' syntax. (It's quite hard to enter tabs in browser edit boxes!)
Maybe the FAQ are helpful? Have a look at a list of supported Features or the ScreenShots.
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?)