This module translates mediawiki syntax into HTML, but it can also convert HTML into several markup languages like:

Wikipedia (Mediawiki)
Moin Moin
JSP Wiki

Apache License, Version 2.0.

- Lucee 4.5+
- Railo 4+
- ColdFusion 9+
- ColdBox 4+


Just drop into your modules folder or use CommandBox to install

box install wikitext

The module registers the wiki converter model: [email protected].  You can then use the following functions to convert markup and HTML and vice-versa:

`js<br>/**<br>* Convert an HTML string to wiki syntax<br>* @wikiTranslator The wiki syntax to use. It must be using a valid translator. See getTranslators()<br>* @htmlString The html string to convert<br>*/<br>function toWiki( required wikiTranslator, required htmlString )<br><br>/**<br>* Convert wiki text and return a structure with two keys: [wikiModel=The java wiki model object,html=the converted html string]<br>* @wikitext The wiki text to convert to HTML<br>*/<br>function toHTML( required wikitext )<br><br><br><br><br>## Settings<br>You can create awikitextsettings structure in yourColdBox.cfcwith the following options:<br><br>``js
wikitext = {
    // The link pattern to translate internal links
    linkPattern = “${title}“,
    // The base URL of the UI module
    linkBaseURL = ““,
    // The image base URL
    imageBaseURL = ““,
    // Allowed wiki attributed
    allowedAttributes = “style,url”,
    // Ignored tags on conversion
    ignoreTagList = “img,iframe”

Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp
www.coldbox.org | www.luismajano.com | www.ortussolutions.com
Because of His grace, this project exists. If you don't like this, then don't read it, its not for you.

>“Therefore being justified by faith, we have peace with God through our Lord Jesus Christ:
By whom also we have access by faith into this grace wherein we stand, and rejoice in hope of the glory of God.
And not only so, but we glory in tribulations also: knowing that tribulation worketh patience;
And patience, experience; and experience, hope:
And hope maketh not ashamed; because the love of God is shed abroad in our hearts by the
Holy Ghost which is given unto us. .” Romans 5:5

 > “I am the way, and the truth, and the life; no one comes to the Father, but by me (JESUS)” Jn 14:1-12


Added ability to fine-tune the settings in the wiki model.
Fixes to add ignore lists, it was not adding them due to a typo.

* Create first CB4 Module version


$ box install wikitext
  • Dec 02 2009 06:27 PM
  • May 25 2017 07:07 PM
  • 4665
  • 1790
  • 2022