Mylyn is an Eclipse plugin and framework for task management. It’s subproject – Mylyn WikiText – provides an extensible framework and tools for parsing, editing and presenting wiki markup. It can be used standalone, integrated into your Java application without any dependencies to Eclipse.
WikiText is licenced under the Eclipse Public License Version 1.0 (“EPL”).
The advantage of using a wiki markup library is that you effectively avoid XSS attacks and you avoid that markup entered messes up your HTML page layout – both common problems when you allow users to enter HTML code into your application.
The disadvantage is that there are not that many good wysiwyg editors that you can integrate into your web application.
The WikiText API supports multiple wiki dialects:
Markup can be converted into the following formats:
- Eclipse Help
The API is extensible, so it is possible to introduce new wiki dialects or to extend an existing markup language.
To integrate Mylyn WikiText into a Java application, all you have to do is to include a core JAR file and at least one JAR file (for the dialect you want to support) into your application. You can find these JAR file on the Mylyn download page under “WikiText Standalone”.
Here is a simple example from the developer guide that shows how to parse MediaWiki markup and covert it to HTML:
MarkupParser markupParser = new MarkupParser(); markupParser.setMarkupLanaguage(new MediaWikiLanguage()); String htmlContent = markupParser.parseToHtml(markupContent);
For more details on how to use and integrate WikiText, see the WikiText Developer Guide.