Sha256: d4e439e10fc2cbce52820dab0cb7eb888d1d59a5e7ed05a7e0ce9054aad3fa59
Contents?: true
Size: 802 Bytes
Versions: 8
Compression:
Stored size: 802 Bytes
Contents
class TextEditorInput < SimpleForm::Inputs::TextInput def input(_wrapper_options) tag_id = "#{object_name}_#{attribute_name}" s = template.select_tag(:dhtml_selector, template.options_for_select([["Rich Text", ""],["Simple Text", "disabled"]], template.cookies[:editorEnabled] == 'true' ? "" : "disabled"), :class => "#{object_name}_#{attribute_name}_dhtml_selector", :tabindex => '-1', :onchange => "toggleEditor('#{tag_id}', this)".html_safe) s += template.content_tag(:div, super, class: 'editor') end # Mark textarea with class for WYSIWYG editor. def input_html_classes super.push('editor') end end
Version data entries
8 entries across 8 versions & 1 rubygems