Mercurial Hosting > freedit
diff src/edit.js.luan @ 25:66fd3784e60e
back to textarea for bbcode
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 19 Jul 2022 22:24:24 -0600 |
parents | da006d1c1eba |
children | 4fdc4ec0050b |
line wrap: on
line diff
--- a/src/edit.js.luan Tue Jul 19 22:07:02 2022 -0600 +++ b/src/edit.js.luan Tue Jul 19 22:24:24 2022 -0600 @@ -17,8 +17,8 @@ let postDiv = document.querySelector('[post="<%=post.id%>"]'); postDiv.querySelector('[output]').style.display = 'none'; postDiv.querySelector('[edit]').innerHTML = document.querySelector('[hidden][edit]').innerHTML; -let contentEditable = postDiv.querySelector('[contentEditable]'); -contentEditable.innerHTML = <%= json_string(html_encode(post.content)) %>; -contentEditable.focus(); +let textarea = postDiv.querySelector('textarea'); +textarea.innerHTML = <%= json_string(html_encode(post.content)) %>; +textarea.focus(); <% end