refactor(mermaid): stop using deprecated APIs

This commit is contained in:
Elian Doran 2025-03-22 14:57:11 +02:00
parent 26fa1ec420
commit 1463411ad1
No known key found for this signature in database
3 changed files with 6 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -142,7 +142,10 @@ export default class ReadOnlyTextTypeWidget extends AbstractTextTypeWidget {
// Initialize mermaid
const mermaid = (await import("mermaid")).default;
mermaid.init(getMermaidConfig(), this.$content.find(".mermaid-diagram")[0]);
mermaid.initialize(getMermaidConfig());
mermaid.run({
nodes: this.$content.find(".mermaid-diagram")
});
}
async refreshIncludedNoteEvent({ noteId }: EventData<"refreshIncludedNote">) {