def fckeditor_textarea_tag(name, content = nil, options = {})
  id = options[:id].blank? ? name : options[:id]

  cols = options[:cols].nil? ? '' : "cols='" + options[:cols] + "'"
  rows = options[:rows].nil? ? '' : "rows='" + options[:rows] + "'"

  width = options[:width].nil? ? '100%' : options[:width]
  height = options[:height].nil? ? '100%' : options[:height]

  toolbarSet = options[:toolbarSet].nil? ? 'Default' : options[:toolbarSet]

  if options[:ajax]
    inputs = "<input type='hidden' id='#{id}_hidden' name='#{name}'>\n" +
             "<textarea id='#{id}' #{cols} #{rows} name='#{id}'>#{content}</textarea>\n"
  else
    inputs = "<textarea id='#{id}' #{cols} #{rows} name='#{name}'>#{content}</textarea>\n"
  end

  base_path = request.relative_url_root.to_s + '/javascripts/fckeditor/'
  inputs +
  javascript_tag( "var oFCKeditor = new FCKeditor('#{id}', '#{width}', '#{height}', '#{toolbarSet}');\n" +
                  "oFCKeditor.BasePath = \"#{base_path}\"\n" +
                  "oFCKeditor.Config['CustomConfigurationsPath'] = '../../fckcustom.js';\n" +
                  "oFCKeditor.ReplaceTextarea();\n")
end

I’ve based this on the fckeditor_textarea helper code so there is some duplication that could be removed if the tag helper was added to the plugin.

All you need to do is put the above code in your application helper and it can then be used in templates much like the Rails text_area_tag helper:

fckeditor_textarea_tag 'text_area_name', h('text_area_content'), :id => 'text_area_id', :cols => '55', :rows => '15'

If you’re using an Ajax based form then you won’t be able to use the fckeditor_before_js helper. You should be able to use this JavaScript, passed as the :before option to form_remote_tag, instead:

var oEditor = FCKeditorAPI.GetInstance('text_area_id');
$('text_area_id_hidden').value = oEditor.GetXHTML();"

Where text_area_id is the ID you used in the fckeditor_textarea_tag call.