Add markdown preview; fix bug with deleted editor

This commit is contained in:
jomo
2014-05-11 06:43:56 +02:00
parent df030f4d2d
commit 19eb868a50
19 changed files with 135 additions and 39 deletions

View File

@@ -1,8 +1,7 @@
<h1>Edit comment</h1>
<%= form_for [@comment.blogpost, @comment] do |f| %>
<%= render partial: "mdhelp" %>
<%= f.text_area :content, placeholder: "Comment" %>
<%= render partial: "md_editor", locals: {name: "comment[content]", content: @comment.content, mini: true} %>
<p><%= f.submit "Update Comment", class: "btn blue left" %></p>
<% end %>
<p><%= button_to "Delete comment", [@comment.blogpost, @comment] , method: "delete", data: {confirm: "Delete comment forever?"}, class: "btn red right" %></p>