add reusable babycode editor
This commit is contained in:
14
js/thread.js
14
js/thread.js
@ -1,8 +1,10 @@
|
||||
const ta = document.getElementById("post_content");
|
||||
{
|
||||
const ta = document.getElementById("post_content");
|
||||
|
||||
for (let button of document.querySelectorAll(".reply-button")) {
|
||||
button.addEventListener("click", (e) => {
|
||||
ta.value += button.value;
|
||||
ta.scrollIntoView()
|
||||
})
|
||||
for (let button of document.querySelectorAll(".reply-button")) {
|
||||
button.addEventListener("click", (e) => {
|
||||
ta.value += button.value;
|
||||
ta.scrollIntoView()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user