mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
Allow HTML nodes in mermaid diagrams (#2192)
This commit is contained in:
parent
831de3ffed
commit
2c450fc72d
@ -97,7 +97,7 @@ async function getRenderedContent(note, options = {}) {
|
|||||||
const documentStyle = window.getComputedStyle(document.documentElement);
|
const documentStyle = window.getComputedStyle(document.documentElement);
|
||||||
const mermaidTheme = documentStyle.getPropertyValue('--mermaid-theme');
|
const mermaidTheme = documentStyle.getPropertyValue('--mermaid-theme');
|
||||||
|
|
||||||
mermaid.mermaidAPI.initialize({ startOnLoad: false, theme: mermaidTheme.trim() });
|
mermaid.mermaidAPI.initialize({ startOnLoad: false, theme: mermaidTheme.trim(), securityLevel: 'antiscript' });
|
||||||
|
|
||||||
try {
|
try {
|
||||||
mermaid.mermaidAPI.render("in-mermaid-graph-" + idCounter++, content,
|
mermaid.mermaidAPI.render("in-mermaid-graph-" + idCounter++, content,
|
||||||
|
@ -54,6 +54,7 @@ export default class MermaidWidget extends NoteContextAwareWidget {
|
|||||||
mermaid.mermaidAPI.initialize({
|
mermaid.mermaidAPI.initialize({
|
||||||
startOnLoad: false,
|
startOnLoad: false,
|
||||||
theme: mermaidTheme.trim(),
|
theme: mermaidTheme.trim(),
|
||||||
|
securityLevel: 'antiscript',
|
||||||
flow: { useMaxWidth: false },
|
flow: { useMaxWidth: false },
|
||||||
sequence: { useMaxWidth: false },
|
sequence: { useMaxWidth: false },
|
||||||
gantt: { useMaxWidth: false },
|
gantt: { useMaxWidth: false },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user