Sha256: d2c92377cf62d0e739cd625f69387c221f43a655e0a6f1a1ff9d448abca1a81d

Contents?: true

Size: 493 Bytes

Versions: 16

Compression:

Stored size: 493 Bytes

Contents

class TrixEditorInput < Formtastic::Inputs::StringInput
  def to_html
    input_wrapping do
      editor_tag_params = {
        input: input_html_options[:id],
        class: 'trix-content'
      }

      editor_tag = template.content_tag('trix-editor', '', editor_tag_params)
      hidden_field = builder.hidden_field(method, input_html_options)

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

      label_html + editor
    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
trix-rails-2.4.0 lib/formtastic/inputs/trix_editor_input.rb
trix-rails-2.3.0 lib/formtastic/inputs/trix_editor_input.rb
trix-editmode-0.0.11 lib/formtastic/inputs/trix_editor_input.rb
trix-editmode-0.0.10 lib/formtastic/inputs/trix_editor_input.rb
trix-editmode-0.0.9 lib/formtastic/inputs/trix_editor_input.rb
trix-editmode-0.0.8 lib/formtastic/inputs/trix_editor_input.rb
trix-editmode-0.0.7 lib/formtastic/inputs/trix_editor_input.rb
trix-editmode-0.0.6 lib/formtastic/inputs/trix_editor_input.rb
trix-editmode-0.0.5 lib/formtastic/inputs/trix_editor_input.rb
trix-editmode-0.0.4 lib/formtastic/inputs/trix_editor_input.rb
trix-editmode-0.0.3 lib/formtastic/inputs/trix_editor_input.rb
trix-editmode-0.0.2 lib/formtastic/inputs/trix_editor_input.rb
trix-rails-2.2.0 lib/formtastic/inputs/trix_editor_input.rb
trix-rails-2.1.0 lib/formtastic/inputs/trix_editor_input.rb
trix-rails-2.0.0 lib/formtastic/inputs/trix_editor_input.rb
trix-rails-1.0.1 lib/formtastic/inputs/trix_editor_input.rb