djsipe.com | Web Development

Code FaceAfter a few posts where I wanted to include code examples, I quickly became frustrated with the standard <pre> display that the folks at WordPress recommend. I looked for a plugin that worked well, but didn’t like what I was seeing. So at the prodding of my colleague, Pat Doran, I decided to roll my own plugin.

The result is my “Code Face” plugin. It uses the YUI JavaScript framework to scan your posts and replace specially tagged <pre> blocks with rich code syntax highlighting via the syntaxhighlighter utility. Ninety-nine percent of the plugin is written in JavaScript using the concept of progressive enhancement. That means that even if your readers have JavaScript turned off or are using a screen reader, the content of your post is still highly accessible.

Check it out and let me know what you think. I’d love to hear your comments.

Tags: , , , ,

Posted in JavaScript, Plugin

3 Responses to “My First Plugin”

  1. PatD Says:

    I find the lack of qbasic or assembly language support to be lame.

    Congrats on getting it up and running! You should totally post it on Wordpress.org.

  2. DJ Says:

    I’ve submitted it to WordPress. They said they’d get back to me. Nothing on dradis yet.

  3. PatD Says:

    Dradis would be a sweet name for a plugin

Leave a Reply

© 2008 Donald J Sipe | Powered by WordPress | RSS Feed