fix: Render Mermaid diagrams in HTML export, towards #6205

This commit is contained in:
Tom Moor
2023-11-23 09:05:40 -05:00
parent ea8ebc3b2a
commit 8b68ee404a
4 changed files with 57 additions and 4 deletions

View File

@@ -32,6 +32,8 @@ type HTMLOptions = {
includeTitle?: boolean;
/** Whether to include style tags in the generated HTML (defaults to true) */
includeStyles?: boolean;
/** Whether to include the Mermaid script in the generated HTML (defaults to false) */
includeMermaid?: boolean;
/** Whether to include styles to center diff (defaults to true) */
centered?: boolean;
/**
@@ -107,6 +109,7 @@ export default class DocumentHelper {
let output = ProsemirrorHelper.toHTML(node, {
title: options?.includeTitle !== false ? document.title : undefined,
includeStyles: options?.includeStyles,
includeMermaid: options?.includeMermaid,
centered: options?.centered,
});