Sha256: 8b65618d6360338483c1b4d8ae92a08086e1d062e02b9bfb7a4e816ca48ad0f1

Contents?: true

Size: 1.31 KB

Versions: 29

Compression:

Stored size: 1.31 KB

Contents

<%= edit_field_wrapper field: @field, index: @index, form: @form, resource: @resource, displayed_in_modal: @displayed_in_modal, full_width: true do %>
  <div
    data-controller="trix-field"
    data-trix-field-target="controller"
    data-resource-name="<%= @resource.model_key %>"
    data-resource-id="<%= @resource.model.id %>"
    data-attachments-disabled="<%= @field.attachments_disabled %>"
    data-attachment-key="<%= @field.attachment_key %>"
    data-hide-attachment-filename="<%= @field.hide_attachment_filename %>"
    data-hide-attachment-filesize="<%= @field.hide_attachment_filesize %>"
    data-hide-attachment-url="<%= @field.hide_attachment_url %>"
    class="relative block overflow-x-auto max-w-full"
  >
    <%= content_tag 'trix-editor',
      class: 'trix-content',
      data: {
        "trix-field-target": "editor",
        **@field.get_html(:data, view: view, element: :input)
      },
      input: trix_id,
      placeholder: @field.placeholder do %>
      <%== @field.value %>
    <% end %>
    <%= @form.text_area @field.id,
      class: classes("w-full hidden"),
      data: @field.get_html(:data, view: view, element: :input),
      disabled: @field.readonly,
      id: trix_id,
      placeholder: @field.placeholder,
      style: @field.get_html(:style, view: view, element: :input)
    %>
  </div>
<% end %>

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
avo-2.13.2.pre.2 app/components/avo/fields/trix_field/edit_component.html.erb
avo-2.13.2.pre.1 app/components/avo/fields/trix_field/edit_component.html.erb
avo-2.13.1 app/components/avo/fields/trix_field/edit_component.html.erb
avo-2.13.0 app/components/avo/fields/trix_field/edit_component.html.erb
avo-2.12.1.pre.1 app/components/avo/fields/trix_field/edit_component.html.erb
avo-2.12.0 app/components/avo/fields/trix_field/edit_component.html.erb
avo-2.11.3.pre.3 app/components/avo/fields/trix_field/edit_component.html.erb
avo-2.11.3.pre.2 app/components/avo/fields/trix_field/edit_component.html.erb
avo-2.11.3.pre.1 app/components/avo/fields/trix_field/edit_component.html.erb
avo-2.11.2.pre.3 app/components/avo/fields/trix_field/edit_component.html.erb
avo-2.11.2.pre.2 app/components/avo/fields/trix_field/edit_component.html.erb
avo-2.11.2.pre.1 app/components/avo/fields/trix_field/edit_component.html.erb
avo-2.11.1.pre.3 app/components/avo/fields/trix_field/edit_component.html.erb
avo-2.11.1 app/components/avo/fields/trix_field/edit_component.html.erb
avo-2.11.1.pre.2 app/components/avo/fields/trix_field/edit_component.html.erb
avo-2.11.1.pre.1 app/components/avo/fields/trix_field/edit_component.html.erb
avo-2.11.0 app/components/avo/fields/trix_field/edit_component.html.erb
avo-2.10.3.pre.1 app/components/avo/fields/trix_field/edit_component.html.erb
avo-2.10.2 app/components/avo/fields/trix_field/edit_component.html.erb
avo-2.9.2.pre1 app/components/avo/fields/trix_field/edit_component.html.erb