Syntax Highlighter ComPress is a plugin for code syntax highlighting. It loads fast on the website and code can pasted easily into Wordpress.
Syntax Highlighter ComPress is a simple WordPress plugin, that is based on the latest Alex Gorbatchev’s SyntaxHighlighter Script. Code and source text of different mark-up or programming languages can be highlighted in WordPress.
There are other WordPress plugin based on the SyntaxHighlighter Script but these cause long page loading times and they are difficult to handle. The advantage of Syntax Highlighter ComPress is that only necessary brush files will be loaded dynamically. Another advantage is that your code can easily pasted into your posts, no need to replace all ‘<
‘ with ‘<
‘.
Supported mark-up or programming are: AppleScript, ActionScript3, Bash/shell, Coldfusion, C#, C++, CSS, Delphi, Diff, Erlang, Groovy, JavaScript, Java, JavaFX, Perl, PHP, Plain Text, Python, Ruby, Scala, SQL, Visual Basic and XML.
The plugin is localized in English, German and Romanian.
This plugin requires WordPress 2.6 or later.
Usage with the TinyMCE button:
Usage without TinyMCE button:
<
‘ with ‘<
‘ (Seach & Replace). Then enclose your code with the pre Tag like this:
<pre class="brush:[code-alias]"> [Your Code Here] </pre>
For the ‘[code-alias]’ segment you have to choose the right syntax/brush alias. For all the available brush aliases check out Alex Gorbatchev’s Webpage. PHP code should look like this:
<pre class="brush:php"> <?php $input = array("Neo", "Morpheus", "Trinity", "Cypher", "Tank"); $rand_keys = array_rand($input, 2); echo $input[$rand_keys[0]] . "\n"; ?> </pre>
The most common browsers are supported.
You need WordPress 2.6 or later.