The Jahia Wiki has for goals to allow you to create Wiki pages and contents in your site.
A wiki is a website that allows the easy creation and editing of any number of interlinked web pages via a web browser using a simplified markup language.
The wiki feature is a jahia module that defines a set of nodes representing a wiki page
[jnt:wikiPage] > jnt:content, mix:title - lastComment (string) - text (string, richtext) i18n
and a set of jsps allowing displaying and creating new wiki pages.
The wiki content can be written thanks to a simplified markup language.
It's handled by a RenderFilter that wraps the framework XWiki (http://www.xwiki.org/).
The jars of XWiki are already available into Jahia. To handle internLink ([[a sub page]] syntax), a custom XHMLLinker has been implemented. Basically, it checks if a pages is available or not. Depending on that, a "create" or a "view" page link is displayed. This LinkRenderer works like the XHTMLLinkrenderer classes provided by default by XWiki and gives access to jahia object like the RenderContext.
public class CustomXHTMLLinkRenderer implements XHTMLLinkRenderer, Initializable {
...
public RenderContext getRenderContext() {
return renderContext;
}
public void setRenderContext(RenderContext renderContext) {
this.renderContext = renderContext;
}
...
}The default markup language is xwiki/2.0 (http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax or http://wiki.easybeans.ow2.org/xwiki/bin/view/Doc/XWikiSyntax)
It corresponds to the property inputSyntax defined in wiki.xml file :
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean name="filter" class="org.jahia.services.render.filter.ModuleFilters">
<property name="module" value="Jahia Wiki"/>
<property name="filters">
<list>
<bean name="WikiFilter" class="org.jahia.wiki.filter.WikiFilter">
<property name="syntaxFactory" ref="defaultSyntaxFactory"/>
<property name="inputSyntax" value="xwiki/2.0"/>
<property name="outputSyntax" value="xhtml/1.0"/>
<property name="applyOnNodeTypes" value="jnt:wikiPage"/>
<property name="applyOnTemplates" value="syntax"/>
</bean>
</list>
</property>
</bean>
<bean id="defaultSyntaxFactory" class="org.xwiki.rendering.internal.parser.DefaultSyntaxFactory"/>
<bean name="NewWikiPageHandler" class="org.jahia.modules.wiki.errors.NewWikiPageHandler"/>
</beans>Supported markup are the ones supported by xwiki:
{{box cssClass="summary box-inner box-inner-border" title="===Content==="}}{{toc start=2}}{{/box}}http://code.xwiki.org/xwiki/bin/view/Macros/TocMacro20