NewXWiki20Syntax

Last modified by Vincent Massol on 2019/06/11 10:10

Apr 29 2009

Starting with XWiki Enterprise 1.7 we've released a new wiki syntax for XWiki (Since XWiki is now Polyglot you can continue to use the old XWiki syntax or use other wiki syntaxes). We're calling this new syntax by the delicious and original name of "XWiki 2.0 Syntax".

Here are some salient points of this new syntax:

  • More consistent syntax and less error prone. All special syntax characters such as bold symbols, italics symbols, link symbols, etc all use 2 characters to prevent ambiguity in case you wish to use that character in your text. For example for bold you can write: 
**bold** but this is a star *
  • Very close to Creole 1.0 (see the Creole 1.0 syntax). The goal of Creole is "a common wiki markup language to be used across different wikis. It's not replacing existing markup but instead enabling wiki users to transfer content seamlessly across wikis, and for novice users to contribute more easily".
  • Meaningful new lines and spaces. This mean new lines are honored unlike traditional wiki-style new lines which are ignored. This was the number one feature asked by our users.
  • Ability to enter wiki syntax in link labels. For example to add an image link you'd write: 
[[image:Space.Page@my.png>>reference]]
  • Ability to pass parameters to any syntax elements including the ability to easily style them. For example to style a portion of text or a section header you can use: 
Some (% class="myclass" style="background-color:#E4E4E5" %)styled text
(% style="color:blue" %)
== header
  • HTML must now be entered using the HTML macro. This allows to enter non-interpreted HTML in the main text. It also provides security control to wiki admins if they want to prevent users from entering HTML (and thus potentially harmful javascript). In addition the HTML macro automatically converts invalid HTML into valid XHTML.
  • Easy linking to attachments using the link syntax. For example: 
[[label>>attach:Space.Page@img.png]]
  • Strong table syntax including ability to have table headers as columns or as rows.
  • Added scripting macros to enter XWiki scripts (We support JSR 223). For now we have official support for Velocity, Groovy and Jython, meaning that the full XWiki API is available directly to you using any of these scripting languages.
  • Email-style quotations. For example: 
> john said this
>> marie answered that
  • Ability to group syntax elements together and thus support very complex use cases such as a table inside a list item inside a table. For example: 
| (((
* item1
* item2
)))
  • The syntax is powerful enough to represent most HTML elements thus allowing us to have a 100% bidirectional WYSIWYG editor with no information loss.
  • Syntax for monospace, verbatim, definition lists, and more.

See the XWiki 2.0 Syntax Guide for more details. Note that we have an automatic converter that converts XWiki 1.0 syntax into 2.0 syntax.

We hope you'll enjoy this new syntax which we've tried to make the most powerful wiki syntax out there. Feedbacks welcome! emoticon_smile

Created by Vincent Massol on 2008/12/25 16:08