WikiTool Class - Documentation topics on: confluence,markdown,mediawiki,textile,trac,tracwiki,twiki,velocity tools,viewtools,wiki,.

WikiTool Class

dotCMS includes a viewtool - $dotwiki  - that can parse markdown and wiki formated content.  The viewtool supports Mediawiki, textile, confluence, tracwiki and twiki markup.  Depending on what format your content is marked up in, using the tool looks something like this:

$dotwiki.mediawiki("wiki content")
$dotwiki.textile("wiki content")
$dotwiki.confluence("wiki content")
$dotwiki.textile("wiki content")
$dotwiki.tracwiki("wiki content")
$dotwiki.twiki("wiki content")


public class WikiTool

This class is used to transform marked-up text into HTML using one of the following markup languages: MediaWiki, Confluence, Textile, TracWiki and TWiki

Method Detail

mediawiki

public java.lang.String mediawiki(java.lang.String text)

Converts text into a partial html using the MediaWiki markup language

Parameters:text - Text to convertReturns:HTML String


mediawikiToHTML

public java.lang.String mediawikiToHTML(java.lang.String text,
java.lang.String cssPath)

Converts text into a partial html using the MediaWiki markup language

Parameters:text - Text to convertcssPath - Path to the css file you want ot use. If it is null, this value is not setReturns:HTML String


mediawikiToFullHTML

public java.lang.String mediawikiToFullHTML(java.lang.String text,
java.lang.String cssPath)

Converts text into a full html using the MediaWiki markup language

Parameters:text - Text to convertcssPath - Path to the css file you want ot use. If it is null, no addtional css file will be includedReturns:HTML String


textile

public java.lang.String textile(java.lang.String text)

Converts text into a partial html using the Textile markup language

Parameters:text - Text to convertReturns:HTML String


textileToHTML

public java.lang.String textileToHTML(java.lang.String text,
java.lang.String cssPath)

Converts text into a partial html using the Textile markup language

Parameters:text - Text to convertcssPath - Path to the css file you want ot use. If it is null, no addtional css file will be includedReturns:HTML String


textileToFullHTML

public java.lang.String textileToFullHTML(java.lang.String text,
java.lang.String cssPath)

Converts text into a full html using the Textile markup language

Parameters:text - Text to convertcssPath - Path to the css file you want ot use. If it is null, no addtional css file will be includedReturns:HTML String


confluence

public java.lang.String confluence(java.lang.String text)

Converts text into a partial html using the Confluence markup language

Parameters:text - Text to convertReturns:HTML String


confluenceToHTML

public java.lang.String confluenceToHTML(java.lang.String text,
java.lang.String cssPath)

Converts text into a partial html using the Confluence markup language

Parameters:text - Text to convertcssPath - Path to the css file you want ot use. If it is null, no addtional css file will be includedReturns:HTML String


confluenceToFullHTML

public java.lang.String confluenceToFullHTML(java.lang.String text,
java.lang.String cssPath)

Converts text into a full html using the Confluence markup language

Parameters:text - Text to convertcssPath - Path to the css file you want ot use. If it is null, no addtional css file will be includedReturns:HTML String


tracwiki

public java.lang.String tracwiki(java.lang.String text)

Converts text into a partial html using the TrackWiki markup language

Parameters:text - Text to convertReturns:HTML String


tracwikiToHTML

public java.lang.String tracwikiToHTML(java.lang.String text,
java.lang.String cssPath)

Converts text into a partial html using the TrackWiki markup language

Parameters:text - Text to convertcssPath - Path to the css file you want ot use. If it is null, no addtional css file will be includedReturns:HTML String


tracwikiToFullHTML

public java.lang.String tracwikiToFullHTML(java.lang.String text,
java.lang.String cssPath)

Converts text into a full html using the TrackWiki markup language

Parameters:text - Text to convertcssPath - Path to the css file you want ot use. If it is null, no addtional css file will be includedReturns:HTML String


twiki

public java.lang.String twiki(java.lang.String text)

Converts text into a partial html using the TWiki markup language

Parameters:text - Text to convertReturns:HTML String


twikiToHTML

public java.lang.String twikiToHTML(java.lang.String text,
java.lang.String cssPath)

Converts text into a partial html using the TWiki markup language

Parameters:text - Text to convertcssPath - Path to the css file you want ot use. If it is null, no addtional css file will be includedReturns:HTML String


twikiToFullHTML

public java.lang.String twikiToFullHTML(java.lang.String text,
java.lang.String cssPath)

Converts text into a full html using the TWiki markup language

Parameters:text - Text to convertcssPath - Path to the css file you want ot use. If it is null, no addtional css file will be includedReturns:HTML String


wikiOtherLanguageToHTML

public java.lang.String wikiOtherLanguageToHTML(java.lang.String text,
java.lang.String markupLanguage)

Converts string into and html using one of the following markup languages: MediaWiki, Confluence, Textile, TracWiki and TWiki

Parameters:text - Text to convertmarkupLanguage - Name of the markupt language to useReturns:HTML String


wikiOtherLanguageToHTML

public java.lang.String wikiOtherLanguageToHTML(java.lang.String text,
java.lang.String cssPath,
java.lang.String markupLanguage)

Converts string into a parcial HTML using the markup language (MediaWiki, Confluence, Textile, TracWiki and TWiki) and css path specified

Parameters:text - Text to convertcssPath - Path to the css file you want ot use. If it is null, no addtional css file will be includedmarkupLanguage - Type of Wiki Markup language to use. Values allowed: MediaWiki, Confluence, Textile, TracWiki, and TWikiReturns:HTML String


wikiOtherLanguageToFullHTML

public java.lang.String wikiOtherLanguageToFullHTML(java.lang.String text,
java.lang.String cssPath,
java.lang.String markupLanguage)

Converts string into an full HTML using the markup language (MediaWiki, Confluence, Textile, TracWiki and TWiki) and css path specified

Parameters:text - Text to convertcssPath - Path to the css file you want ot use. If it is null, no addtional css file will be includedmarkupLanguage - Type of Wiki Markup language to use. Values allowed: MediaWiki, Confluence, Textile, TracWiki, and TWikiReturns:HTML String


wikiToHTML

public java.lang.String wikiToHTML(java.lang.String text,
boolean fullHTML,
java.lang.String cssPath,
java.lang.String markupLanguage)

Converts string into an full or parcial HTML, using the markup language (MediaWiki, Confluence, Textile, TracWiki and TWiki) and css path specified

Parameters:text - Text to convertfullHTML - True if you want to generate the full html body; false if you want to generate just the given textcssPath - Path to the css file you want ot use. If it is null, no addtional css file will be includedmarkupLanguage - Type of Wiki Markup language to use. Values allowed: MediaWiki, Confluence, Textile, TracWiki, and TWikiReturns:HTML String