Tuesday, June 2, 2009

Syntax Highlighting

To use the syntax highlighting, use the following tags:

<pre name="code" class="Java">
public void test() {
// Do some stuff here
}
</pre>

You should enter this code in "Edit Html" editor mode. The preview does not include the necessary javascript, so it doesn' t function. You have to publish the post.
The result is:

public void test() {
// Do some stuff here
}
The idea comes from here.

So, use
  • "Java" for java
  • "Sql" for sql
  • "JScript" for java script
  • "Xml" for xml
  • "Css" for css

0 comments: