Sha256: d446bf327bb3b2fa14352ea9e89c0f61b8a07ae83abc7664dcbe275b645bdc30

Contents?: true

Size: 1.2 KB

Versions: 44

Compression:

Stored size: 1.2 KB

Contents

<%= field_wrapper **field_wrapper_args do %>
  <%= content_tag :div,
    class: "relative block overflow-x-auto max-w-4xl",
    data: {
      controller: "trix-field",
      trix_field_target: "controller",
      resource_name: resource_name,
      resource_id: resource_id,
      attachments_disabled: @field.attachments_disabled,
      attachment_key: @field.attachment_key,
      hide_attachment_filename: @field.hide_attachment_filename,
      hide_attachment_filesize: @field.hide_attachment_filesize,
      hide_attachment_url: @field.hide_attachment_url,
    } do %>
    <%= 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 %>
      <%= sanitize @field.value.to_s %>
    <% end %>
    <%= @form.text_area @field.id,
      value: @field.value,
      class: classes("w-full hidden"),
      data: @field.get_html(:data, view: view, element: :input),
      disabled: disabled?,
      id: trix_id,
      placeholder: @field.placeholder,
      style: @field.get_html(:style, view: view, element: :input)
    %>
  <% end %>
<% end %>

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
avo-3.6.1 app/components/avo/fields/trix_field/edit_component.html.erb
avo-3.6.0 app/components/avo/fields/trix_field/edit_component.html.erb
avo-3.5.8 app/components/avo/fields/trix_field/edit_component.html.erb
avo-3.5.7 app/components/avo/fields/trix_field/edit_component.html.erb
avo-3.5.6 app/components/avo/fields/trix_field/edit_component.html.erb
avo-3.5.6.beta1 app/components/avo/fields/trix_field/edit_component.html.erb
avo-3.5.5 app/components/avo/fields/trix_field/edit_component.html.erb
avo-3.5.4 app/components/avo/fields/trix_field/edit_component.html.erb
avo-3.5.3 app/components/avo/fields/trix_field/edit_component.html.erb
avo-3.5.2 app/components/avo/fields/trix_field/edit_component.html.erb
avo-3.5.1 app/components/avo/fields/trix_field/edit_component.html.erb
avo-3.5.0 app/components/avo/fields/trix_field/edit_component.html.erb
avo-3.4.4 app/components/avo/fields/trix_field/edit_component.html.erb
avo-3.4.3 app/components/avo/fields/trix_field/edit_component.html.erb
avo-3.4.2 app/components/avo/fields/trix_field/edit_component.html.erb
avo-3.4.1 app/components/avo/fields/trix_field/edit_component.html.erb
avo-3.4.0 app/components/avo/fields/trix_field/edit_component.html.erb
avo-3.3.6 app/components/avo/fields/trix_field/edit_component.html.erb
avo-3.3.5 app/components/avo/fields/trix_field/edit_component.html.erb
avo-3.3.4 app/components/avo/fields/trix_field/edit_component.html.erb