Syntax Highlighter Document

( 5 Votes )

Joomla plugin SyntaxHighlighter looks for <pre /> tags with the following format  attribute:<pre class="brush: aliase">.

Currently, SyntaxHighlighter support the following brush aliases.

Brush name Brush aliases File name
ActionScript3 as3, actionscript3 shBrushAS3.js
Bash/shell bash, shell shBrushBash.js
C# c-sharp, csharp shBrushCSharp.js
C++ cpp, c shBrushCpp.js
CSS css shBrushCss.js
Delphi delphi, pas, pascal shBrushDelphi.js
Diff diff, patch shBrushDiff.js
Groovy groovy shBrushGroovy.js
JavaScript js, jscript, javascript shBrushJScript.js
Java java shBrushJava.js
JavaFX jfx, javafx shBrushJavaFX.js
Perl perl, pl shBrushPerl.js
PHP php shBrushPhp.js
Plain Text plain, text shBrushPlain.js
PowerShell ps, powershell shBrushPowerShell.js
Python py, python shBrushPython.js
Ruby rails, ror, ruby shBrushRuby.js
Scala scala shBrushScala.js
SQL sql shBrushSql.js
Visual Basic vb, vbnet shBrushVb.js
XML xml, xhtml, xslt, html, xhtml shBrushXml.js

Joomla plugin SyntaxHighlighter  allows you only load some of the brush to speed the load time and save bandwidth.

Syntax Highlighter Settings

 

A simple example:

Code

<pre class="brush:java">
public class JavaCodeHighter{
  public static void main(String[] args){
   System.out.print("Just Test");
 }
}
</pre>

Result

public class JavaCodeHighter{
  public static void main(String[] args){
   System.out.print("Just Test");
 }
}