Sha256: 38f286f8ff0af8434ad41974e3ed4323e9e971191d54af200ac55c892a55af13

Contents?: true

Size: 530 Bytes

Versions: 14

Compression:

Stored size: 530 Bytes

Contents

module ActionView
  module Helpers
    class FormBuilder
      def wysiwyg(method, options={})
        sanitized_object_name = @object_name.gsub(/\]\[|[^-a-zA-Z0-9:.]/, "_").sub(/_$/, "")
        sanitized_method_name = method.to_s.sub(/\?$/,"")
        id = "#{sanitized_object_name}_#{sanitized_method_name}"
        @template.send('text_area', @object_name, method, objectify_options(options.merge({:class => 'wysiwyg'}))) + @template.content_tag('script', "new nicEditor().panelInstance('#{id}');")
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
kitsune-0.0.16 lib/kitsune/form_helper_ext.rb
kitsune-0.0.14 lib/kitsune/form_helper_ext.rb
kitsune-0.0.13 lib/kitsune/form_helper_ext.rb
kitsune-0.0.12 lib/kitsune/form_helper_ext.rb
kitsune-0.0.11 lib/kitsune/form_helper_ext.rb
kitsune-0.0.10 lib/kitsune/form_helper_ext.rb
kitsune-0.0.9 lib/kitsune/form_helper_ext.rb
kitsune-0.0.8 lib/kitsune/form_helper_ext.rb
kitsune-0.0.7 lib/kitsune/form_helper_ext.rb
kitsune-0.0.6 lib/kitsune/form_helper_ext.rb
kitsune-0.0.5 lib/kitsune/form_helper_ext.rb
kitsune-0.0.4 lib/kitsune/form_helper_ext.rb
kitsune-0.0.3 lib/kitsune/form_helper_ext.rb
kitsune-0.0.2 lib/kitsune/form_helper_ext.rb