I have been using the for a while now, but its been bugging me a little that I have to type
<pre name="code" class="html:nogutter:nocontrols"> Some code goes here </pre>
In order to put in some java code. Infact, I can hardly ever remember the invocation.
I discovered s for wordpress which is a simple way to write little plugins. So I wrote my own. Just pop it in your plugins directory and go activate from WordPress.
Now i can type:
[java]
public class MyClass {
}
[/java]
Unfortunately it only works in later versions of WordPress (at least 2.5), this blog is 2.04 and so I may have to upgrade, which I am scared of because of all the customisations I’ve made.
Update:
Now ive upgraded, so here’s some Java!
public class SomeSillyClass {
public static void main (String[] args) {
System.out.println(“WordPress Rocks!”);
}
}
Some hard won knowledge was that not only do the stylesheets control the look and feel, but also the javascript “brushes” which are found in the script folder for the google syntax plugin (e.g. shBrushRuby.js)
| 25-Mar-09 at 5:42 pm | Permalink
[...] I just built this here which means I can now do lovely stuff with code smippets without any pain! [...]