Sha256: 55866e854b53bd8a0b05fe7f78151f54e5f1a6b97f3d35188638f9395e787dc8

Contents?: true

Size: 1.11 KB

Versions: 16

Compression:

Stored size: 1.11 KB

Contents

<%#
The following params are the variables that can be used in this partial.

@param form [Wallaby::FormBuilder] custom form object that adds a few helper methods and delegate missing methods to the view
@param object [Wallaby::ResourceDecorator] decorator instance which wraps the resource (e.g. ActiveRecord) instance
@param field_name [String] name of the field
@param value [Object] value of the field
@param metadata [Hash] metadata of the field
%>
<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: 'summernote' } %>
  <%= form.error_messages field_name %>
  <%= hint_of metadata %>
</div>

<% unless @summernote_init %>
  <% @summernote_init = true %>
  <% content_for :custom_javascript do %>
    <% javascript_tag do %>
      documentReady('.summernote', function () {
        $('textarea[data-init="summernote"]').summernote({
          height: 150,
          codemirror: { // codemirror options
            theme: 'base16-dark'
          }
        })
      })
    <% end %>
  <% end %>
<% end %>

Version data entries

16 entries across 4 versions & 1 rubygems

Version Path
wallaby-8.0.0 app/views/wallaby/resources/form/_tinytext.html.erb
wallaby-8.0.0 app/views/wallaby/resources/form/_text.html.erb
wallaby-8.0.0 app/views/wallaby/resources/form/_mediumtext.html.erb
wallaby-8.0.0 app/views/wallaby/resources/form/_longtext.html.erb
wallaby-7.0.0 app/views/wallaby/resources/form/_longtext.html.erb
wallaby-7.0.0 app/views/wallaby/resources/form/_mediumtext.html.erb
wallaby-7.0.0 app/views/wallaby/resources/form/_text.html.erb
wallaby-7.0.0 app/views/wallaby/resources/form/_tinytext.html.erb
wallaby-7.0.0.beta2 app/views/wallaby/resources/form/_text.html.erb
wallaby-7.0.0.beta2 app/views/wallaby/resources/form/_longtext.html.erb
wallaby-7.0.0.beta2 app/views/wallaby/resources/form/_mediumtext.html.erb
wallaby-7.0.0.beta2 app/views/wallaby/resources/form/_tinytext.html.erb
wallaby-7.0.0.beta1 app/views/wallaby/resources/form/_tinytext.html.erb
wallaby-7.0.0.beta1 app/views/wallaby/resources/form/_text.html.erb
wallaby-7.0.0.beta1 app/views/wallaby/resources/form/_mediumtext.html.erb
wallaby-7.0.0.beta1 app/views/wallaby/resources/form/_longtext.html.erb