!!Color Code Plugin
By [RoyPhillips]

This plugin implements the {{[WikiPlugin|JSPWikiPlugin]}} interface,
providing an {{execute}} implemenation that renders the
body text as colorized source code, according to either a named
''syntax'' parameter, and/or parameter values provided at 
the plugin's point of invocation.
 
Example:
{{{
[{ColorCodePlugin syntax='sql'
 
select count(*) from dual
}]
}}}

The above example will attempt to load a resource named 'sql' from the webapps
classpath, for example, a [properties file|ColorCodePluginProperties], and use the properties in it to format the text

Alternatively, the configuration can be specified as immeidate parameters to the Plugin, as in this cheap-and-cheerful XML example:

{{{
[{ColorCodePlugin 
                  colorcode.keywords='version,encoding,!doctype,public,xml'
                  colorcode.special.pattern='<[/]?[a-z_-]+>'
                  tokenizer.wordChar: '.,-,/,!,<,>'
                  tokenizer.ordinaryChar: '<,>'

(...xml document here...)
}]
}}}

----
[Back|ContributedPlugins]