Sha256: a5541eb856c077b013d12a1ce0c226023fd9d967c0d450bacee1e9429ae937e2

Contents?: true

Size: 699 Bytes

Versions: 18

Compression:

Stored size: 699 Bytes

Contents

# frozen_string_literal: true

# rubocop:disable Rails/ContentTag
# 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, :data)
    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
# rubocop:enable Rails/ContentTag

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
renalware-core-2.1.1 app/inputs/trix_editor_input.rb
renalware-core-2.1.0 app/inputs/trix_editor_input.rb
renalware-core-2.0.167 app/inputs/trix_editor_input.rb
renalware-core-2.0.166 app/inputs/trix_editor_input.rb
renalware-core-2.0.165 app/inputs/trix_editor_input.rb
renalware-core-2.0.164 app/inputs/trix_editor_input.rb
renalware-core-2.0.163 app/inputs/trix_editor_input.rb
renalware-core-2.0.162 app/inputs/trix_editor_input.rb
renalware-core-2.0.161 app/inputs/trix_editor_input.rb
renalware-core-2.0.160 app/inputs/trix_editor_input.rb
renalware-core-2.0.159 app/inputs/trix_editor_input.rb
renalware-core-2.0.158 app/inputs/trix_editor_input.rb
renalware-core-2.0.157 app/inputs/trix_editor_input.rb
renalware-core-2.0.156 app/inputs/trix_editor_input.rb
renalware-core-2.0.155 app/inputs/trix_editor_input.rb
renalware-core-2.0.153 app/inputs/trix_editor_input.rb
renalware-core-2.0.152 app/inputs/trix_editor_input.rb
renalware-core-2.0.151 app/inputs/trix_editor_input.rb