JSPWiki comes with two wiki syntaxes: JSPWiki and markdown. Also, as with almost everything in JSPWiki, you can add support for your own wiki syntax.
The quick list of wiki syntax is available at the Help tab at the top of the page (when you are editing it).
The complete list of the syntax is at TextFormattingRules.
Markdown Support is also present in JSPWiki just by enabling jspwiki.syntax=markdown on your jspwiki-custom.properties file.
Adding support for custom wiki syntaxes#
To add support for custom syntaxes you must provide several (groups of) classes / files and add them as normal JSPWiki custom 3rd party code. In this sense, the markdown module on the source distribution is a good example to follow. Specifically you need:
- Wiki syntax renderer fo WYSIWYG editor: needed if you need to display the resulting HTML somewhat different on the WYSIWYG editor, i.e, to add/remove some css classes. Usually you don't need to provide a custom class for this, and it will be fine to use the normal wiki syntax renderer. In any case, you must specify this renderer on your jspwiki-custom.properties file using the property jspwiki.renderingManager.renderer.wysiwyg.
- A Wiki.Snips.js file: to add support on the plain wiki editor for the custom wiki syntax. This file must end up anywhere inside the META-INF/resources folder of the jar file and referred by the property jspwiki.syntax.plain on your jspwiki-custom.properties file.
- F.ex., if the file ends up in META-INF/resources/plain/wiki-snips-awesome-syntax.js, it should be referred as jspwiki.syntax.plain=plain/wiki-snips-awesome-syntax.js.
- The easiest way to provide one of these files is to just copy either the jspwiki syntax snips file or the markdown syntax snips one, and proceed to modify whatever is needed.