Sha256: d6dd6f41e30c98bf346358946568601fbb4bb180e6ca51306d8b11a8f42fbb56

Contents?: true

Size: 544 Bytes

Versions: 8

Compression:

Stored size: 544 Bytes

Contents

# frozen_string_literal: true

module Formtastic
  module Inputs
    class QuillEditorInput < Formtastic::Inputs::TextInput
      def to_html
        input_wrapping do
          label_html <<
            template.content_tag(:div, input_html_options.merge('data-aa-quill-editor': '1')) do
              builder.hidden_field(input_name) <<
                template.content_tag(:div, 'data-aa-quill-content': '1') do
                  object.send(method).try :html_safe
                end
            end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
activeadmin_quill_editor-1.2.0 lib/formtastic/inputs/quill_editor_input.rb
activeadmin_quill_editor-1.1.0 lib/formtastic/inputs/quill_editor_input.rb
activeadmin_quill_editor-1.0.0 lib/formtastic/inputs/quill_editor_input.rb
activeadmin_quill_editor-0.3.4 lib/formtastic/inputs/quill_editor_input.rb
activeadmin_quill_editor-0.3.2 lib/formtastic/inputs/quill_editor_input.rb
activeadmin_quill_editor-0.3.0 lib/formtastic/inputs/quill_editor_input.rb
activeadmin_quill_editor-0.2.14 lib/formtastic/inputs/quill_editor_input.rb
activeadmin_quill_editor-0.2.12 lib/formtastic/inputs/quill_editor_input.rb