Home > Syntax Highlighter > SyntaxHighlighterPro document

SyntaxHighlighterPro document

November 27th, 2009

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.

  1. February 5th, 2010 at 05:47 | #1

    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.

  2. Joe
    February 5th, 2010 at 20:48 | #2

    Phil :

    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.

  3. June 23rd, 2010 at 14:36 | #3

    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

  4. October 21st, 2010 at 13:20 | #4

    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.

  5. November 6th, 2010 at 20:12 | #5

    When I try to set the brush to vb I get an error saying the brush cannot be found. What am I doing wrong?

  6. Joe
    December 13th, 2010 at 21:24 | #6

    By default, the plugin doesn’t load the vb brush, please enable the brush in the settings for the plugin.

  7. Joe
    December 13th, 2010 at 21:28 | #7

    This should be a bug of the original syntaxhighlighter bug.
    you can ask help here:
    http://alexgorbatchev.com/SyntaxHighlighter/

  8. December 17th, 2010 at 10:38 | #8

    great post, thanks for sharing

  9. January 11th, 2011 at 17:40 | #9

    awesome plugin, thanks :)

  1. November 5th, 2010 at 13:37 | #1
Comments are closed.