This plugin allows you to have code fragments automatically formatted and highlighted. It uses the Beautifier library (included) written by Mike Jewell.
Syntax Rules
Insert the code between %CODE{"language"}% and %ENDCODE%. The following table indicates the values used for the different languages:
Additional languages can be added since the Beautifier library is flexible and can support a wide range of language families. Other languages can be added with relative ease by downloading the full PHP dist from http://www.beautifier.org and converting the relevant language file from PHP to Perl.
Display Customisation
The code fragments are formaated using CSS. To change the look, upload a new version of style.css to this topic.
Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, i.e. %BEAUTIFIERPLUGIN_SHORTDESCRIPTION%
Set SHORTDESCRIPTION = Highlights and formats code fragments
Plugin Installation Instructions
Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.
Download the ZIP file from the Plugin web (see below)
Unzip BeautifierPlugin.zip in your twiki installation directory, this will also install the Beautifier library by default. Content:
(Dakar) Visit configure in your TWiki installation, and enable the plugin in the {Plugins} section.
To install the Beautifier library, either install it in the Perl library folder or unpack it into the twiki directory. For the latter, the following files are installed: