Class: TextEditorInput
- Inherits:
-
SimpleForm::Inputs::TextInput
- Object
- SimpleForm::Inputs::TextInput
- TextEditorInput
- Defined in:
- app/inputs/text_editor_input.rb
Instance Method Summary collapse
- #input(_wrapper_options) ⇒ Object
-
#input_html_classes ⇒ Object
Mark textarea with class for WYSIWYG editor.
Instance Method Details
#input(_wrapper_options) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 |
# File 'app/inputs/text_editor_input.rb', line 3 def input() tag_id = "#{object_name}_#{attribute_name}" s = template.select_tag(:dhtml_selector, template.([["Rich Text", ""],["Simple Text", "disabled"]], template.[: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 |
#input_html_classes ⇒ Object
Mark textarea with class for WYSIWYG editor.
16 17 18 |
# File 'app/inputs/text_editor_input.rb', line 16 def input_html_classes super.push('editor') end |