add: parse_image_line, parse_link_line
This commit is contained in:
parent
d8167aa06f
commit
9fe5735127
9 changed files with 234 additions and 25 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue