Sha256: b5c6aa58e8d320a701f457f6f06afbf1a5965edc753db1797b82d01804cccf3a

Contents?: true

Size: 623 Bytes

Versions: 2

Compression:

Stored size: 623 Bytes

Contents

# frozen_string_literal: true

# See https://github.com/kylefox/trix/blob/master/lib/trix/simple_form/trix_editor_input.rb
class TrixEditorInput < SimpleForm::Inputs::Base
  def input(_wrapper_options)
    trix_options = options.slice(:spellcheck, :toolbar, :tabindex, :input, :class)
    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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
renalware-core-2.0.144 app/inputs/trix_editor_input.rb
renalware-core-2.0.143 app/inputs/trix_editor_input.rb