SyntaxHighlighterPro document
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.
I like your plugin, I just combined it with gorzek’s BBCode Filter and modified the plugin that I can use BB-Like code like:
[bash] … [/bash] or [java] … [/java]
so I don’t have to switch into sourcecode mode and my layout is not compromised when I have to change something.
probably you can directly add something like this.
much easier to use.
Good advice!
I will try to integrate the BBCode Filter to SyntaxHighlighterPro directly in the next release.
Hello, I like your plugin, I added support for the Processing code.
Brush page: http://en.myinventions.pl/index.php?page=ProcessingSyntaxHighlighting
Plugin changed http://www.mentescreadoras.com.ar/syntaxhighlighterpro.zip
I’ve got a problem with the plugin. If I have long lines of code, I want it to leave them long and create a horizontal scroll bar. In stead, it wrapps the code. Anithing I can do about it…? Thanks.
When I try to set the brush to vb I get an error saying the brush cannot be found. What am I doing wrong?
By default, the plugin doesn’t load the vb brush, please enable the brush in the settings for the plugin.
This should be a bug of the original syntaxhighlighter bug.
you can ask help here:
http://alexgorbatchev.com/SyntaxHighlighter/
great post, thanks for sharing
awesome plugin, thanks