This commit is contained in:
zadam
2021-09-30 13:02:07 +02:00
parent 8a8bdaf80e
commit a68fd5ab83
4 changed files with 17 additions and 14 deletions

View File

@@ -6,6 +6,8 @@ import libraryLoader from "./library_loader.js";
import openService from "./open.js";
import froca from "./froca.js";
let idCounter = 1;
async function getRenderedContent(note, options = {}) {
options = Object.assign({
trim: false,
@@ -93,7 +95,7 @@ async function getRenderedContent(note, options = {}) {
.css("justify-content", "space-around");
try {
mermaid.mermaidAPI.render("mermaid-graph", content,
mermaid.mermaidAPI.render("in-mermaid-graph-" + idCounter++, content,
content => $renderedContent.append($(content)));
} catch (e) {
const $error = $("<p>The diagram could not displayed.</p>");