Sha256: 93af8ed44c40684e6fd70d4f9dadc4fdd06a134c36671645c92711d9767ad24b

Contents?: true

Size: 612 Bytes

Versions: 4

Compression:

Stored size: 612 Bytes

Contents

<%= edit_field_wrapper field: @field, index: @index, form: @form, resource: @resource, displayed_in_modal: @displayed_in_modal do %>
  <% trix_id = "trix_#{@resource.name.underscore}_#{@field.id}" %>
  <trix-editor input="<%= trix_id %>" placeholder="<%= @field.placeholder %>"><%== @field.value %></trix-editor>
  <%= @form.text_area @field.id,
    id: trix_id,
    class: helpers.input_classes('w-full hidden', has_error: (@resource.model.present? and @resource.model.errors.include?(@field.id))),
    placeholder: @field.placeholder,
    disabled: @field.readonly,
    rows: @field.meta[:rows]
  %>
<% end %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
avo-1.3.5 app/components/avo/edit/fields/trix_field_component.html.erb
avo-1.3.4 app/components/avo/edit/fields/trix_field_component.html.erb
avo-1.3.3 app/components/avo/edit/fields/trix_field_component.html.erb
avo-1.3.2 app/components/avo/edit/fields/trix_field_component.html.erb