Sha256: fd4c06bf04674d6860fe8dcd3169950e706b41e768a5c095d940345e892ddbe1

Contents?: true

Size: 572 Bytes

Versions: 14

Compression:

Stored size: 572 Bytes

Contents

module Trix
  module SimpleForm
    class TrixEditorInput < ::SimpleForm::Inputs::Base
      def input(_wrapper_options)
        trix_options = options.slice(:spellcheck, :toolbar, :tabindex, :input)
        editor_options = { input: input_class, class: 'trix-content' }.merge(trix_options)

        editor_tag = template.content_tag('trix-editor', '', editor_options)
        hidden_field = @builder.hidden_field(attribute_name, input_html_options)

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

Version data entries

14 entries across 14 versions & 2 rubygems

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