Ok, I admit I overreacted slightly to the Rails bug and have now realised I was talking rubbish. So here is a release that works with 1.1.6 and plays well with everybody. It also updates the install code and moves the fckcustom.js config file out of the base fckeditor install directory. This means that you can update or delete the install without having to worry about removing any customizations you have made.

In the new fckcustom.js (public/javascripts/fckcustom.js) there is also now an example of creating your own toolbar which can now be included using

<%= fckeditor_textarea("object", "field", :ajax => true, :toolbarSet => 'Simple', :width => '400', :height => '200') %>

As Jeff Owens has pointed out there are still issues with the Flash upload and I will try to address those as soon as possible.

This release fixes the plugin for Rails 1.1.6. The fix is has been applied by overriding the new version of “safe_load_paths” in “routing.rb”.

However, I am not really happy with the current fix as it won’t play well with other plugins doing the same or with Engines. I think the answer is to convert this to a Rails Engine and let that system handle the routing.

It seems to me that the new fixes leave only two options to plugins developers:

  1. copy any files to the apps directory when installing
  2. use Engines

Not too sure I like copying loads of files around, if only because I don’t like the idea of the same thing existing in mulitple places within a single app. So that means Engines – therefore seems like a version of this functionality should be in the Core (especially if you are gonna stop the existing ways of dynamically creating a controller).

This fixes a couple of bugs and upgrades to version 2.3.1 of FCKeditor. The are a couple of changes to the way things work:

1) No controller, helper or view copied to the Rails app directory (you need to delete these if upgrading)

2) The editor files can now be included using

<%= javascript_include_tag :fckeditor %>

No spell check yet, and there are some issues with the file upload refreshing the resource browser after completion. Also there are no progress indicators for the ajax requests which can leave you wondering what (if anything) is going on.

Continue reading »

Aug 112006

Found a nice overview of the prototype library .

And then found Encytemedia and these articles about graceful degredation:

  1. graceful-degredation-with-prototype-rails-part-1
  2. graceful-degredation-with-prototype-rails-part-2

Encytemedia is the blog of Justin Palmer, and he has made a great job of customizing Typo.

I have set up a project for the FCKeditor plugin on RubyForge. Now, you can just install it using:

ruby script/plugin install svn://rubyforge.org//var/svn/fckeditorp/trunk/fckeditor

This will take care of the install process meaning you can just include the editor in your views using the helpers described in my previous post.

These helpers also now include :height and :width options to set the size of the editor. Both of these options are used like so – :height => ‘400’.

Continue reading »

It was a good evening yesterday at the LRUG meeting in Clerkenwell (Skills Matter). Both of the presentations were interesting, but it was the talk by Tom Armitage on ‘Ruby on Rails from the Other Side of the tracks’ that sparked my interests most. Although, I have to admit it wasn’t really the content on designers and programmers working in perfect harmony that got my attention as much as the talk about the Rails javascript helpers and the nasty javascript that they produce. This is outlined in a good article by Dan Web‘Rails is the Devil on you Client Side Shoulder’

Tom mentioned a plugin that has recently been released by Luke Redpath and Dan Web which (in Luke’s words) “allows you to use CSS selectors to attach Javascript events to your page. This plugin allows you to make use of the event:Selectors library, but in Ruby, directly from your controller or view and have the resulting behaviour rules dynamically generated at runtime in an external javascript file.”. This seems to me to be a much nicer way of doing things, nice one Luke and Dan.

Following on from my experiences with FCKEditor and Rails, I decided to wrap the whole thing up as a plugin. This can be downloaded here or installed using the plugin install command, see this post

It basically combines and extends the following pieces of work:

  1. Integrate FCKEditor with your Ruby on Rails application
    By Joshua M Charles
  2. Implementation details for FCKEditor integration with Ruby on Rails
  3. FCKEditor On Rails

The end result is the editor with a working resource manager and a set of helpers that allow use with both AJAX and basic HTML forms.

Continue reading »

We (Cominded) have been looking at various rich text editors to play with and I went through a few before eventually deciding that FCKEditor was worth a more detailed look (Others included TinyMCE which is available as a Rails plugin, but isn’t really upto FCK’s standards. It did have the advantage of being under the Creative Commons license, but as we are creating services this ended up not being the deciding factor).

Continue reading »