add [u], [big], [small], [color], [center], [right] tags to babycode

This commit is contained in:
2025-08-05 01:25:38 +03:00
parent a529c1db65
commit b0fd2a4f0c
6 changed files with 129 additions and 5 deletions

View File

@ -42,6 +42,7 @@
const buttonBold = document.getElementById("post-editor-bold");
const buttonItalics = document.getElementById("post-editor-italics");
const buttonStrike = document.getElementById("post-editor-strike");
const buttonUnderline = document.getElementById("post-editor-underline");
const buttonUrl = document.getElementById("post-editor-url");
const buttonCode = document.getElementById("post-editor-code");
const buttonImg = document.getElementById("post-editor-img");
@ -105,6 +106,10 @@
e.preventDefault();
insertTag("s")
})
buttonUnderline.addEventListener("click", (e) => {
e.preventDefault();
insertTag("u")
})
buttonUrl.addEventListener("click", (e) => {
e.preventDefault();
insertTag("url=", false, "link label");