add: parse_image_line, parse_link_line

This commit is contained in:
trisua 2025-07-24 01:06:03 -04:00
parent d8167aa06f
commit 9fe5735127
9 changed files with 234 additions and 25 deletions

View file

@ -144,6 +144,14 @@ globalThis.tab_editor = () => {
};
globalThis.tab_preview = async () => {
if (
!document
.getElementById("preview_tab_button")
.classList.contains("camo")
) {
return;
}
// render
const res = await (
await fetch("/api/v1/render", {
@ -151,6 +159,7 @@ globalThis.tab_preview = async () => {
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
content: globalThis.editor.getValue(),
metadata: globalThis.metadata_editor.getValue(),
}),
})
).text();