comparison src/edit.js.luan @ 60:8b5b1bce7d6b

bcode menus
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 30 Nov 2022 23:50:52 -0700
parents 289718f121e4
children
comparison
equal deleted inserted replaced
59:02d8876dc41d 60:8b5b1bce7d6b
16 %> 16 %>
17 let postDiv = document.querySelector('[post="<%=post.id%>"]'); 17 let postDiv = document.querySelector('[post="<%=post.id%>"]');
18 postDiv.querySelector('[output]').style.display = 'none'; 18 postDiv.querySelector('[output]').style.display = 'none';
19 bbcodeCreate( postDiv.querySelector('[edit]'), { 19 bbcodeCreate( postDiv.querySelector('[edit]'), {
20 content: <%= json_string(html_encode(post.content)) %>, 20 content: <%= json_string(html_encode(post.content)) %>,
21 save: saveEdit, 21 buttons: {
22 cancel: cancelEdit, 22 Save: saveEdit,
23 Cancel: cancelEdit,
24 }
23 } ); 25 } );
24 let textarea = postDiv.querySelector('textarea'); 26 let textarea = postDiv.querySelector('textarea');
25 textarea.focus(); 27 textarea.focus();
26 <% 28 <%
27 end 29 end