Mercurial Hosting > freedit
diff src/save_edit.js.luan @ 19:da006d1c1eba
use contentEditable
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 13 Jul 2022 08:47:13 -0600 |
parents | bff178656073 |
children | 33731231093a |
line wrap: on
line diff
--- a/src/save_edit.js.luan Mon Jul 11 12:14:05 2022 -0600 +++ b/src/save_edit.js.luan Wed Jul 13 08:47:13 2022 -0600 @@ -25,8 +25,8 @@ local html = output_of(function() bbcode_to_html(post.content) end) Io.stdout = Http.response.text_writer() %> -cancelEdit('<%=post.id%>'); let postDiv = document.querySelector('[post="<%=post.id%>"]'); +cancelEdit(postDiv); postDiv.querySelector('[message]').innerHTML = <%= json_string(html) %>; <% end