diff --git a/config/initializers/fckeditor_text_area_tag.rb b/config/initializers/fckeditor_text_area_tag.rb
new file mode 100644
index 0000000..0642279
--- /dev/null
+++ b/config/initializers/fckeditor_text_area_tag.rb
@@ -0,0 +1,29 @@
+module Fckeditor
+ module Helper
+ def fckeditor_textarea_tag(name, value='', options={})
+ options[:id] ||= name
+ 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 = "\n" <<
+ "\n"
+ else
+ inputs = "\n"
+ end
+
+ js_path = "#{ActionController::Base.relative_url_root}/javascripts"
+ base_path = "#{js_path}/fckeditor/"
+ return inputs <<
+ javascript_tag("jQuery(document).ready(function(){ var oFCKeditor = new FCKeditor('#{options[:id]}', '#{width}', '#{height}', '#{toolbarSet}');\n" <<
+ "oFCKeditor.BasePath = \"#{base_path}\"\n" <<
+ "oFCKeditor.Config['CustomConfigurationsPath'] = '#{js_path}/fckcustom.js';\n" <<
+ "oFCKeditor.ReplaceTextarea(); });\n")
+ end
+ end
+end
diff --git a/vendor/plugins/ansuz_form_builder/app/controllers/admin/form_fields_controller.rb b/vendor/plugins/ansuz_form_builder/app/controllers/admin/form_fields_controller.rb
index db6ada3..64a70eb 100644
--- a/vendor/plugins/ansuz_form_builder/app/controllers/admin/form_fields_controller.rb
+++ b/vendor/plugins/ansuz_form_builder/app/controllers/admin/form_fields_controller.rb
@@ -21,19 +21,20 @@ def new
end
def create
+ options = {:label => params[:label]}
# create the appropriate stuff...
case params[:type]
# TODO: Split this up and provide an API for other plugins to add form field types to the builder
when "Text Field"
- @field = Ansuz::JAdams::FormFieldTextField.new
+ @field = Ansuz::JAdams::FormFieldTextField.new(options)
@form_field.form_builder_id = @form_builder.id
@form_field.field = @field
when "Text Area"
- @field = Ansuz::JAdams::FormFieldTextArea.new
+ @field = Ansuz::JAdams::FormFieldTextArea.new(options)
@form_field.form_builder_id = @form_builder.id
@form_field.field = @field
when "Rich Text Area"
- @field = Ansuz::JAdams::FormFieldTextArea.new
+ @field = Ansuz::JAdams::FormFieldTextArea.new(options)
@form_field.form_builder_id = @form_builder.id
@form_field.field = @field
@field.settings["has_rich_content_editor"] = true
diff --git a/vendor/plugins/ansuz_form_builder/app/models/ansuz/j_adams/form_field_text_field.rb b/vendor/plugins/ansuz_form_builder/app/models/ansuz/j_adams/form_field_text_field.rb
index f811693..a477bc6 100644
--- a/vendor/plugins/ansuz_form_builder/app/models/ansuz/j_adams/form_field_text_field.rb
+++ b/vendor/plugins/ansuz_form_builder/app/models/ansuz/j_adams/form_field_text_field.rb
@@ -1,3 +1,4 @@
+# FIXME: The whole form builder should be built with inheritance, what the heck happened here?
module Ansuz
module JAdams
class FormFieldTextField < ActiveRecord::Base
diff --git a/vendor/plugins/ansuz_form_builder/app/views/admin/form_builders/_edit.html.erb b/vendor/plugins/ansuz_form_builder/app/views/admin/form_builders/_edit.html.erb
index 5487cef..9efd2db 100644
--- a/vendor/plugins/ansuz_form_builder/app/views/admin/form_builders/_edit.html.erb
+++ b/vendor/plugins/ansuz_form_builder/app/views/admin/form_builders/_edit.html.erb
@@ -1,6 +1,3 @@
-<%= link_to famfamfam_icon("add") + " Add a field", new_admin_form_builder_form_field_path(plugin_module) %>
-
-