feat(share): render inline mermaid (closes #5438)

This commit is contained in:
Elian Doran
2025-07-22 20:05:29 +03:00
parent 7fdef3418a
commit b833806ec7
2 changed files with 26 additions and 2 deletions

View File

@@ -29,6 +29,14 @@ async function formatCodeBlocks() {
await formatCodeBlocks($("#content"));
}
async function setupTextNote() {
formatCodeBlocks();
applyMath();
const setupMermaid = (await import("./share/mermaid.js")).default;
setupMermaid();
}
/**
* Fetch note with given ID from backend
*
@@ -50,8 +58,7 @@ document.addEventListener(
const noteType = determineNoteType();
if (noteType === "text") {
formatCodeBlocks();
applyMath();
setupTextNote();
}
const toggleMenuButton = document.getElementById("toggleMenuButton");