mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
added mermaid samples to demo document
This commit is contained in:
parent
a68fd5ab83
commit
291b434d70
BIN
db/demo.zip
BIN
db/demo.zip
Binary file not shown.
38
libraries/mermaid.min.js
vendored
38
libraries/mermaid.min.js
vendored
File diff suppressed because one or more lines are too long
@ -278,7 +278,7 @@ export default class ApperanceOptions {
|
||||
|
||||
this.$themeSelect.val(options.theme);
|
||||
|
||||
this.$overrideThemeFonts.prop('checked', options.overrideThemeFonts);
|
||||
this.$overrideThemeFonts.prop('checked', options.overrideThemeFonts === 'true');
|
||||
this.$overridenFontSettings.toggle(options.overrideThemeFonts === 'true');
|
||||
|
||||
this.$mainFontSize.val(options.mainFontSize);
|
||||
@ -290,8 +290,6 @@ export default class ApperanceOptions {
|
||||
this.$detailFontSize.val(options.detailFontSize);
|
||||
this.fillFontFamilyOptions(this.$detailFontFamily, options.detailFontFamily);
|
||||
|
||||
console.log(options);
|
||||
|
||||
this.$monospaceFontSize.val(options.monospaceFontSize);
|
||||
this.fillFontFamilyOptions(this.$monospaceFontFamily, options.monospaceFontFamily);
|
||||
}
|
||||
|
@ -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)));
|
||||
|
@ -48,6 +48,8 @@ export default class MermaidWidget extends NoteContextAwareWidget {
|
||||
const documentStyle = window.getComputedStyle(document.documentElement);
|
||||
const mermaidTheme = documentStyle.getPropertyValue('--mermaid-theme');
|
||||
|
||||
console.log(mermaidTheme, "mermaidTheme");
|
||||
|
||||
mermaid.mermaidAPI.initialize({ startOnLoad: false, theme: mermaidTheme.trim() });
|
||||
|
||||
const noteComplement = await froca.getNoteComplement(note.noteId);
|
||||
|
Loading…
x
Reference in New Issue
Block a user