UNPKG

@m2d/mermaid

Version:

Enhance Markdown-to-DOCX conversion with Mermaid and mindmap diagram support using this plugin for @m2d/core. Converts code blocks into SVG images with customizable Mermaid config.

20 lines (19 loc) 723 B
import { IPlugin } from "@m2d/core"; import { MermaidConfig } from "mermaid"; interface IMermaidPluginOptions { /** * Plugin options for configuring Mermaid rendering. * * You can pass a partial MermaidConfig object to customize rendering behavior. * For available options, refer to the Mermaid documentation: * @see https://mermaid.js.org/configuration.html */ mermaidConfig?: MermaidConfig; } /** * Mermaid plugin for @m2d/core. * This plugin detects Mermaid or Mindmap code blocks and converts them into SVG nodes * that are later rendered as images in the generated DOCX document. */ export declare const mermaidPlugin: (options?: IMermaidPluginOptions) => IPlugin; export {};