FCKeditor on Rails

[UPDATE 2007-01-09] So I’ve been writing Ruby/Rails to pay the bills for about 9 months now and this poor project has been suffering much longer than that. I had some time, wanted to clean this up and needed something that wasn’t work to code on to clear the head. So, if you are using Rails 1.2 you can now install this as a plugin in conjunction with Rails Engines or AppablePlugins.

You can get more info on the trac. [/UPDATE]

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.