Sha256: 76fc9835b1851a5e01eefa6b58e36a6b5102844267aa7c722affe29e5e6b5f44

Contents?: true

Size: 656 Bytes

Versions: 2

Compression:

Stored size: 656 Bytes

Contents

<%#
# SimpleMarkdown Form Partial

This partial renders a WYSIWYG text area to help writing Markdown text

## Local variables:

- `f`:
  A Rails form generator, used to help create the appropriate input fields.
- `field`:
  An instance of Administrate::Field::SimpleMarkdown.
%>

<div class="field-unit__label">
  <%= f.label field.attribute %>
</div>
<div class="field-unit__field simple_markdown">
  <%= f.text_area field.attribute %>
</div>
<%= content_for :javascript do %>
  <script type="text/javascript">
    $(function() {
      new EasyMDE({
        element: document.getElementById('<%= field.html_id %>')
      });
    });
  </script>
<% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
administrate-field-simple_markdown-0.4.0.rc2 app/views/fields/simple_markdown/_form.html.erb
administrate-field-simple_markdown-0.4.0.rc1 app/views/fields/simple_markdown/_form.html.erb