Just thought I would share how I got syntax highlighting to work on the previous post on XAJAX.
Check out the WordPress plugin wp-syntax. Blurb:
WP-Syntax provides clean syntax highlighting using GeSHi — supporting a wide range of popular languages. It supports highlighting with or without line numbers and maintains formatting while copying snippets of code from the browser.
Setup:
- Install the plugin
- Activate it
- Example usage:
<pre lang="java"> public class Hello { public static void main(String[] args) { System.out.println("Hello World!"); } } <pre>
Result:
public class Hello { public static void main(String[] args) { System.out.println("Hello World!"); } } |