CodeHighlighter

This plugin is a syntax highlighter for source code. It uses GeSHi as fontifier engine.
Usage
- Put the code snippet in a “` tag.
- Add the lang attribute to the code tag like the following.
<code lang="php"> - Add the lineno attribute to the
<code>tag after the lang tag if you wish to start at a line other than 1.<code lang="cpp" lineno="42"> - If you do not add lang attribute, the
<code>tag is handled normally. - If you want to have border, add the style like the following to your .css file.
code { border: 1px dotted #ccc; padding: 0.2em 0.5em; } - You can use following languages in lang.
abap, actionscript, ada, apache, applescript, asm, asp, autoit, bash, blitzbasic, bnf, c, c_mac, caddcl, cadlisp, cfdg, cfm, cpp-qt, cpp, csharp, css-gen, css, d, delphi, diff, div, dos, dot, eiffel, fortran, freebasic, genero, gml, groovy, haskell, html4strict, idl, ini, inno, io, java, java5, javascript, latex, lisp, lua, m68k, matlab, mirc, mpasm, mysql, nsis, objc, ocaml-brief, ocaml, oobas, oracle8, pascal, per, perl, php-brief, php, plsql, python, qbasic, rails, reg, robots, ruby, sas, scheme, sdlbasic, smalltalk, smarty, sql, tcl, text, thinbasic, tsql, vb, vbnet, vhdl, visualfoxpro, winbatch, xml, xpp, z80
Note: Version 1.9 adds support for <code> tags, however to ensure backwards compatibility support for the <pre> tag will not be removed.
Known issues
- Because this plugin uses regular expression to match string range from
<code lang="some">to “`, you can’t use</code>in your code snippet. If you must put the</code>tag, you can put a space between<and/code>like< /code>. The< /code>is converted to</code>automatically by plugin. - If you want to change the style, you should modify the plugin source file.
Download & install the zip archive
The plugin package installer can be downloaded from the WP2E project tab called “code”.
1 – Select the version to download if this option is available otherwise the “latest” version of the main plugin will be used.
2 – After downloading the zip archive install the plugin package installer in you local environment and activate the script from the plugin list.
3 – Under the section “Plugins” of the admin dashboard you should see a new “Dependencies & Licenses” link. Follow the instructions from this panel to finalize the installation of the missing dependencies.
- Give a name to your project
- Download the Installer Package
- Install & activate the plugin locally
- Install the suggested dependencies
Tips: Use the WP2E panel to add/suggest new dependencies to the local installation. Press F5 in the list of dependencies if the changes are not displayed right away.



