add reusable babycode editor
This commit is contained in:
@ -54,13 +54,11 @@
|
||||
<% if not edit then %>
|
||||
<%- post.content %>
|
||||
<% else %>
|
||||
<form class="post-edit-form" method="post">
|
||||
<textarea name="new_content" required><%- post.original_markup %></textarea>
|
||||
<span>
|
||||
<input type=submit value="Save">
|
||||
<a class="linkbutton warn" href="<%= url_for("thread", {slug = thread.slug}, {page = page}) .. "#post-" .. post.id %>">Cancel</a>
|
||||
</span>
|
||||
</form>
|
||||
<% render("views.common.babycode-editor", {
|
||||
cancel_url = url_for("thread", {slug = thread.slug}, {page = page}) .. "#post-" .. post.id,
|
||||
prefill = post.original_markup,
|
||||
ta_name = "new_content"
|
||||
}) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user