Sha256: e4302f40fe540d724cfb23e22ddfca9061c1274e98a803ea2174c673b8e9b283

Contents?: true

Size: 1.42 KB

Versions: 5

Compression:

Stored size: 1.42 KB

Contents

<%= content_tag :div,
  class: [
    text_editor.css_classes,
    text_editor.settings[:display_inline] ? "display_inline" : ""
  ], data: text_editor.data_attributes do %>
  <%= element_form.fields_for(:ingredients, text_editor.ingredient) do |f| %>
    <%= ingredient_label(text_editor) %>
    <div class="input-field">
      <%= f.text_field :value,
        class: text_editor.settings[:linkable] ? "text_with_icon" : "",
        id: text_editor.form_field_id,
        minlength: text_editor.length_validation&.fetch(:minimum, nil),
        maxlength: text_editor.length_validation&.fetch(:maximum, nil),
        required: text_editor.presence_validation?,
        pattern: text_editor.format_validation,
        type: text_editor.settings[:input_type] || "text" %>
      <% if text_editor.settings[:anchor] %>
        <%= render "alchemy/ingredients/shared/anchor", ingredient_editor: text_editor %>
      <% end %>
      <% if text_editor.settings[:linkable] %>
        <%= f.hidden_field :link, "data-link-value": true, id: nil %>
        <%= f.hidden_field :link_title, "data-link-title": true, id: nil %>
        <%= f.hidden_field :link_class_name, "data-link-class": true, id: nil %>
        <%= f.hidden_field :link_target, "data-link-target": true, id: nil %>
        <%= render "alchemy/ingredients/shared/link_tools", ingredient_editor: text_editor, wrapper_class: "ingredient_link_buttons" %>
      <% end %>
    </div>
  <% end %>
<% end %>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
alchemy_cms-7.3.4 app/views/alchemy/ingredients/_text_editor.html.erb
alchemy_cms-7.3.3 app/views/alchemy/ingredients/_text_editor.html.erb
alchemy_cms-7.3.2 app/views/alchemy/ingredients/_text_editor.html.erb
alchemy_cms-7.3.1 app/views/alchemy/ingredients/_text_editor.html.erb
alchemy_cms-7.3.0 app/views/alchemy/ingredients/_text_editor.html.erb