Class: TrixEditorInput
- Inherits:
-
Formtastic::Inputs::StringInput
- Object
- Formtastic::Inputs::StringInput
- TrixEditorInput
- Defined in:
- lib/formtastic/inputs/trix_editor_input.rb
Instance Method Summary collapse
Instance Method Details
#to_html ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/formtastic/inputs/trix_editor_input.rb', line 2 def to_html input_wrapping do editor_tag_params = { input: [:id], class: 'trix-content' } editor_tag = template.content_tag('trix-editor', '', editor_tag_params) hidden_field = builder.hidden_field(method, ) editor = template.content_tag('div', hidden_field + editor_tag, class: 'trix-editor-wrapper') label_html + editor end end |