最近开发同事需要在XWIKI页面显示JSON格式和其他一些代码。开发同事平时习惯使用Mardown编辑他们的文档,为了把这些文档直接添加到XWIKI页面,需要XWIKI能够支持Markdown语法格式。

参考文章

http://rendering.xwiki.org/xwiki/bin/view/Main/

http://maxiang.info/#/?id=readme


编辑xwiki.cfg,添加markdown语法支持

#-# [Since 1.6RC1] Defines the list of supported syntaxes
#-# Available syntaxes are: 
#-#    xwiki/2.0, xwiki/2.1, confluence/1.0, jspwiki/1.0, creole/1.0,  mediawiki/1.0, twiki/1.0, xhtml/1.0,
#-#    html/4.01, plain/1.0, docbook/4.4, markdown/1.0, markdown/1.1, apt/1.0
#-#
#-# Note that starting with XWiki 5.0 the xwiki/1.0 syntax is not shown in anymore in the Edit Panel since we want to
#-# prevent users from creating content in that deprecated syntax. Existing documents in that Syntax will be still be
#-# rendered properly though.
xwiki.rendering.syntaxes = xwiki/2.0, xwiki/2.1, markdown/1.0, markdown/1.1

然后重新启动tomcat


wKiom1R27xuwUm4TAAJugY75M3k304.jpg

wKioL1R275-gQxR6AAOTeflJb8s315.jpg