mermaid-to-drawnix
Convert mermaid diagrams to drawnix
Set up
Install packages:
yarn
Start development playground:
yarn start
Build command:
yarn build
Get started
parseMermaidToDrawnix(diagramDefinition: string, config?: MermaidConfig)
The diagramDefinition is the mermaid diagram definition.
and config is the mermaid config. You can use the config param when you want to pass some custom config to mermaid.
Currently mermaid-to-drawnix only supports the :point_down: config params
{
startOnLoad?: boolean;
flowchart?: {
curve?: "linear" | "basis";
};
themeVariables?: {
fontSize?: string;
};
maxEdges?: number;
maxTextSize?: number;
}
Example code:
import { parseMermaidToDrawnix } from "@drawnix/mermaid-to-drawnix";
try {
const { elements, files } = await parseMermaidToDrawnix(
diagramDefinition,
{
themeVariables: {
fontSize: "25px",
},
}
);
} catch (e) {
}
Playground
Try out here.
Thanks
Inspired by mermaid-to-excalidraw