Sha256: 2a6d6f1a1cdb4a9dc41b7162c78426985d9f68f24bcc3ce55085344e7901b119

Contents?: true

Size: 715 Bytes

Versions: 2

Compression:

Stored size: 715 Bytes

Contents

<div class="form-group <%= form.error_class field_name %>">
  <%= form.label field_name, metadata[:label] %>
  <%= form.text_area field_name, class: 'form-control', data: { init: 'codemirror', mode: 'xml' } %>
  <%= form.error_messages field_name %>
</div>

<% unless @codemirror_init %>
  <% @codemirror_init = true %>
  <% content_for :custom_javascript do %>
    <% javascript_tag do %>
      jQuery(function($) {
        $('textarea[data-init="codemirror"]').each(function (index, element) {
          CodeMirror.fromTextArea(element, {
            mode: $(element).data('mode'),
            theme: "default",
            lineNumbers: true
          });

        })
      })
    <% end %>
  <% end %>
<% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
wallaby-4.1.6 app/views/wallaby/resources/form/_xml.html.erb
wallaby-5.0.1 app/views/wallaby/resources/form/_xml.html.erb