<% form = assigns[:f] %> <% action_text = assigns[:action_text] || ~c"Edit" %> <% action_icon = assigns[:action_icon] || ~c"edit" %> <% field_name = assigns[:name] || :body %> <% field_placeholder = assigns[:placeholder] || "Your message" %> <% is_required = assigns[:required] %> <% input_classes = assigns[:class] %>
<%= action_text %> Preview
<%= render(PhilomenaWeb.MarkdownView, "_help.html", conn: @conn) %> <%= render(PhilomenaWeb.MarkdownView, "_toolbar.html", conn: @conn) %>
<%= textarea(form, field_name, class: add_classes("input input--wide input--text input--resize-vertical js-toolbar-input js-preview-input", input_classes), placeholder: field_placeholder, required: required?(is_required)) %> <%= error_tag(form, field_name) %>