ColdFusion syntax highlighting in Wordpress

Posted on July 15, 2008
Filed Under ColdFusion, Wordpress | 2 Comments

So this is a code blog and every good with a lot of code needs a good code plugin. A friend put me onto a nice little plugin for WP called SyntaxHighlighter Plus – it leverages off a googlecode project that highlights for a whole swag of languages all in javascript. Pretty slick.

Unfortunately there is no language support for ColdFusion built in. Happily, a few helpful blog posts later, I found a ColdFusion “brush” drop-in for SyntaxHighlighter. You can download the JS brush here.

Just drop it into the wp-content\plugins\syntaxhighlighter-plus\shlfiles directory and either modify the syntaxhighlighter.php file with references to ColdFusion or you can download my modified php file. You can either reference the language with either “coldfusion” or “cf”.

I will contact the plugin authors and see if they will agree to add the CF language file permanently to the distribution with the permission of the original brush file author.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Reddit
  • Technorati

Comments

2 Responses to “ColdFusion syntax highlighting in Wordpress”

  1. Neil Middleton on July 16th, 2008 12:35 am
  2. Alkema on March 4th, 2009 9:46 pm

    This doesn’t work for me. I think by looking at the code, this brush was made for SyntaxHighlighter, not SyntaxHighlighter-plus as stated in the description.

    The new version defines the brushes like this…

    SyntaxHighlighter.brushes.Coldfusion = function()

    Yet this brush is defined like this…

    dp.sh.Brushes.ColdFusion=function()

    Which is the old way that the brush funtion was defined.

Leave a Reply