Scott Rutherford

Life on and off the Rails

 

I’ve just released the next version of the FCKeditor plugin. The main change in this version is the addition of the spell check functionality using ASpell. A big thank you to Ken Pratt for providing the patch for that and at the same time providing a solution (I hope) to the routing issues that some people have had.

If you already have this plugin installed you can upgrade by just deleting the existing install and getting it again. If you have altered the fckcustom.js file then you will need to add:

FCKConfig.SpellChecker = 'SpellerPages';

to it . If not just delete that too before reinstalling. You also need to be sure that ASpell is installed along with any dictionaries you want to use (If you are on windows check the README for the expected install directory).

Read the rest of this entry

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.

Read the rest of this entry

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’.

Read the rest of this entry

FCKEditor Plugin for Rails

August 7th, 2006

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.

Read the rest of this entry

Using FCKEditor In Rails

August 3rd, 2006

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).

Read the rest of this entry
This blog used the Shay theme as a base and is powered by Mephisto