Archive

Archive for the ‘Syntax Highlighter’ Category

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.

SyntaxHighlighterPro demo

November 27th, 2009 2 comments
  1. C Example:
    #include 
    main()
    {
             printf ("Hello World!\n");
    }
        
  2. Java Example:

    public class HelloWorld{
        public static void main(String [] args) {
            System.out.println("Hello world!");
        }
    }
    
  3. XML Example:

    
       Tove
       Jani
       Reminder
       Don't forget me this weekend!
    
    

SyntaxHighlighterPro

November 26th, 2009 No comments

SyntaxHighlighterPro is a wordpress plugin which uses the SyntaxHighlighter to highlight code snippets.

Major features:

  1. Support up to 24 languages, including Java,C++,C#,Php,JavaScript,Groovy,Ruby,Python,Perl,XML,SQL etc.
  2. Support up to 5 theme styles, that are Default,Django,Eclipse,Emacs,FadeToGrey,Midnight,RDark. You can easily change the theme in plugin settings.

    Theme styles

  3. Allow you to choose what languages will support, which is great to avoid unnecessary JavaScript imports.

    Language support

  4. Support BBCode input.
    Please enable BBCode option in SyntaxHighlighterPro Setting page before using BBCode input.

Download:Syntax Highlighter Pro