<%= javascript_packs_with_chunks_tag "validateFileInputs", "responseTemplates", defer: true %> <% if @comment.errors.any? %>

<%= pluralize(@comment.errors.count, "error") %> prohibited this comment from being saved:

<% end %> <%= form_for(@comment, authenticity_token: false, html: { class: "comment-form" }) do |f| %> <% if @article&.comment_template.present? && @comment.new_record? %>
This post comes with a comment template
<% end %> <%# this is used by JS and it will be replaced with the CSRF token received from the server %> <% unless @comment.persisted? %> <%= f.hidden_field :commentable_id, value: commentable&.id %> <%= f.hidden_field :commentable_type, value: commentable_type %> <%= f.hidden_field :parent_id, value: @parent_comment.id if @parent_comment %> <% end %> pic
<%= f.text_area :body_markdown, placeholder: "Add to the discussion", onfocus: "handleFocus(event)", onblur: "handleBlur(event)", onkeyup: "handleKeyUp(event)", onkeydown: "handleKeyDown(event)", oninput: "handleChange(event)", id: "text-area", # autofocus: @comment.persisted?, required: true, class: "crayons-textfield comment-textarea crayons-textfield--ghost", 'aria-label': "Add a comment to the discussion" %>
<%= inline_svg_tag("info.svg", aria: true, class: "crayons-icon", title: "Editor guide") %>
<% end %> <% if @comment.persisted? %> <% end %>