SyntaxHighlighterPro document
November 27th, 2009
9 comments
It is quite easy to use the wordpress plugin SyntaxHighlighterPro. You need just activate the plugin, and then assign the brush to the pre tag.
For example:
<pre class="brush:java">
public class HelloWorld{
public static void main(String [] args) {
System.out.println("Hello world!");
}
}
</pre>
Then it will render the code as following:
public class HelloWorld{
public static void main(String [] args) {
System.out.println("Hello world!");
}
}
In above example,java is the brush alias of the language.
You can also use the BBCode to insert the code, for example:
[java]
public class HelloWorld{
public static void main(String [] args) {
System.out.println("Hello world!");
}
}
[/java]
Please enable BBCode support before using BBCode.
Please refer Brush Aliases for more details.


