Mercurial Hosting > freedit
comparison src/edit.js.luan @ 42:0c1b820fff34
use push
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 08 Nov 2022 14:02:28 -0700 |
parents | 4fdc4ec0050b |
children | 289718f121e4 |
comparison
equal
deleted
inserted
replaced
41:acb730710328 | 42:0c1b820fff34 |
---|---|
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 postDiv.querySelector('[edit]').innerHTML = document.querySelector('[hidden][edit]').innerHTML; | 19 postDiv.querySelector('[edit]').innerHTML = document.querySelector('[hidden][edit]').innerHTML; |
20 let textarea = postDiv.querySelector('textarea'); | 20 let textarea = postDiv.querySelector('textarea'); |
21 textarea.innerHTML = <%= json_string(html_encode(post.content)) %>; | 21 textarea.innerHTML = <%= json_string(html_encode(post.content)) %>; |
22 fixTextarea(textarea); | |
22 textarea.focus(); | 23 textarea.focus(); |
23 <% | 24 <% |
24 end | 25 end |