Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
37 lines (26 sloc) 1.68 KB
jWiki is a class transforming wiki text to other formats. XHTML for example.
This class inherits from [[|Wikirenderer]] version 3.1.
In order to transform, Wikirenderer needs some precise objects, which grouped
together become the //transform rules//.
There are a bunch of //transform rules// already bundled with jelix
(see @@F@lib/wikirenderer/rules/@@). For instance, wr3_to_xhtml allows to
transform wiki (wr3 syntax) into XHTML. It is also possible to transform
dokuwiki code into XHTML, or mediawiki into docbook. All combinations are
possible. you only need to give or develop the good set of transform rules.
To use jWiki, just instantiate it with a //transform rules// name. If you want
to transform wiki "wr3" into XHTML, just do:
<code php>
$wr = new jWiki('wr3_to_xhtml');
$xhtml = $wr->render($wiki_text);
//transform rules// delivered with Jelix are in @@F@lib/wikirenderer/rules@@,
but you can add your own set in @@F@your_app/plugins/wr_rules/@@. Note: remember
to activate app:plugins repository in your configuration, if you intend to do so.
If you store your own //transform rules// into @@F@your_app/plugins/wr_rules/@@,
each //transform rules// should be in its own directory, like any jelix plugins.
So, if you have a "superwiki_to_xhtml" rule, you have to store its source code
into the file @@F@your_app/plugins/wr_rules/superwiki_to_xhtml/superwiki_to_xhtml.rule.php@@.
In this file you should have a class @@C@superwiki_to_xhtml@@ inheriting
from @@C@WikiRendererConfig@@ or the class of an other rule.
For more informations, browse the [[|Wikirenderer Documentation]].
You can’t perform that action at this time.