hotfix pagebreak

This commit is contained in:
Mateusz Gruszczyński
2026-09-12 09:47:21 +02:00
parent ba0c2a84d5
commit 8df9b5d092
7 changed files with 245 additions and 4 deletions
+3
View File
@@ -409,6 +409,9 @@ export function startNoteEditor(adapter) {
const nodes = [...preview.querySelectorAll(".mermaid")];
if (!nodes.length) return;
try {
nodes.forEach(node => {
if (!node.dataset.mermaidSource) node.dataset.mermaidSource = node.textContent || "";
});
const mermaid = await loadMermaid();
mermaid.initialize({ startOnLoad: false, theme: getTheme() === "dark" ? "dark" : "default", securityLevel: "strict" });
await mermaid.run({ nodes });