Underpants Gnome


FCKeditor on Rails

Posted in Tech by Michael on the September 11th, 2005

I’ve been reading all this great stuff about Ruby on Rails so I told my boss that we should look into it, then I expensed a copy of Agile web Development with Rails and gave it a read. It looked promising.

I read a post on the Rails blog the other day about integrating FCKeditor with Rails and thought that would be a nice addition, unfortunately the method mentioned was little more than how to drop tags in a page to get FCKeditor to go. There wasn’t any real Rails to it.

I decided that would make a somewhat interesting project to start playing with Rails as it needs to interact with the file system a little. So I spent the past day-and-a-halfish building FCKeditor on Rails, it’s a little rough around the edges and I still want to integrate the mcpuk File Browser becasue it has so much more functionality than the default.

The end result is a Rails helper/controller that lets you add an FCKeditor instance just like you would expect in Rails:

fckeditor(:object, :param, {:width => '600px', :height => '500px'})

not to shabby. Now we will see how long it takes me to get around to adding mcpuk support.

The source can also be found in the FCKeditor trac project.

3 Responses to 'FCKeditor on Rails'

Subscribe to comments with RSS

  1. leftist said,

    on February 5th, 2006 at 10:57 pm

    Hello! You’ve just made my month.

    How’s that mcpuk support coming? :)

  2. Michael said,

    on February 5th, 2006 at 11:09 pm

    Well to be honest, none of the projects I am currently working on use FCKeditor and I thought that this thing had no interest so I haven’t done much for mcpuck support.

    For some reson this appears to have gotten some life over the weekend, did it show up someplace??

  3. scott said,

    on August 8th, 2006 at 12:53 am

    Hi,

    Nice work on the editor.
    I have created a plugin for this in Rails, and I thought you might be interested:

    http://blog.caronsoftware.com/articles/2006/08/07/fckeditor-plugin-for-rails

    It hasn’t added all the extra bits you have added yet (param validation, size constraints on the helpers) but it does work on AJAX forms.

    Cheers
    Scott.

Leave a Reply

You must be logged in to post a comment.