Inside Out Outside In

Adding Code Block support for BlogCFC and FCKEditor

If you use a rich text editor with Ray's BlogCFC, you've probably run into some quirks when you try to use code blocks.  By default, Ray's editor uses a standard textarea form element.  I've been using the FCKEditor on BlogCFC for sometime and today I decided to extend the toolbar to support a codeblock dialog.

FCKEditor supports a plug-in architecture.  The enclosure provides the base files (sorry, I haven't taken the time to package it up nicely).  If you follow through the wiki developer instructions, you should be able to add code block support fairly easily.

For my dialog, I chose to use JSMX, one of the simplest CF/AJAX libraries I've found. I converted the old cf_coloredCode custom tag to cfc remoting service.  The code is typed/pasted into the dialog, and then the plugin dialog calls the colorizer.cfc and pastes the result into the main editor window.

 

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
mikeD's Gravatar Mind showing a screenie or walk through for the n00bs out there?
# Posted By mikeD | 6/20/06 4:51 PM
admin's Gravatar I'll put something more together in a day or two. I was sick yesterday and was just cranking out code while I was resting. As soon as I have something a litte more glossy I'll post it.
# Posted By admin | 6/21/06 10:09 AM