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