mirror of
https://github.com/zadam/trilium.git
synced 2025-11-14 09:15:50 +01:00
added mermaid samples to demo document
This commit is contained in:
@@ -94,6 +94,11 @@ async function getRenderedContent(note, options = {}) {
|
||||
.css("display", "flex")
|
||||
.css("justify-content", "space-around");
|
||||
|
||||
const documentStyle = window.getComputedStyle(document.documentElement);
|
||||
const mermaidTheme = documentStyle.getPropertyValue('--mermaid-theme');
|
||||
|
||||
mermaid.mermaidAPI.initialize({ startOnLoad: false, theme: mermaidTheme.trim() });
|
||||
|
||||
try {
|
||||
mermaid.mermaidAPI.render("in-mermaid-graph-" + idCounter++, content,
|
||||
content => $renderedContent.append($(content)));
|
||||
|
||||
Reference in New Issue
Block a user