Sha256: 4e1d396e924a6ba647103be451b20f0faec043c50c18fa9b02f6c05a11f6b24d

Contents?: true

Size: 461 Bytes

Versions: 8

Compression:

Stored size: 461 Bytes

Contents

class TrixEditorInput < Formtastic::Inputs::StringInput
  def to_html
    input_wrapping do
      editor_tag_params = {
        input: input_html_options[:id]
      }
      editor_tag = template.content_tag('trix-editor', '', editor_tag_params)
      hidden_field = builder.hidden_field(method, input_html_options)

      editor = template.content_tag('div', editor_tag + hidden_field, class: 'trix-editor-wrapper')

      label_html + editor
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
trix-0.10.2 lib/formtastic/inputs/trix_editor_input.rb
trix-0.10.1 lib/formtastic/inputs/trix_editor_input.rb
trix-0.10.0 lib/formtastic/inputs/trix_editor_input.rb
trix-0.9.10 lib/formtastic/inputs/trix_editor_input.rb
trix-0.9.9 lib/formtastic/inputs/trix_editor_input.rb
trix-0.9.8 lib/formtastic/inputs/trix_editor_input.rb
trix-0.9.7 lib/formtastic/inputs/trix_editor_input.rb
trix-0.9.6 lib/formtastic/inputs/trix_editor_input.rb