
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
@excalidraw/mermaid-to-excalidraw
Advanced tools
Convert mermaid diagrams to excalidraw
Install packages:
yarn
Start development playground:
yarn start
Build command:
yarn build
parseMermaidToExcalidraw(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-excalidraw only supports the :point_down: config params
{
/**
* Whether to start the diagram automatically when the page loads.
* @default false
*/
startOnLoad?: boolean;
/**
* The flowchart curve style.
* @default "linear"
*/
flowchart?: {
curve?: "linear" | "basis";
};
/**
* Theme variables
* @default { fontSize: "20px" }
*/
themeVariables?: {
fontSize?: string;
};
/**
* Maximum number of edges to be rendered.
* @default 500
*/
maxEdges?: number;
/**
* Maximum number of characters to be rendered.
* @default 50000
*/
maxTextSize?: number;
}
Example code:
import { parseMermaidToExcalidraw } from "@excalidraw/mermaid-to-excalidraw";
try {
const { elements, files } = await parseMermaidToExcalidraw(
diagramDefinition,
{
themeVariables: {
fontSize: "25px",
},
}
);
// Render elements and files on Excalidraw
} catch (e) {
// Parse error, displaying error message to users
}
Try out here.
Head over to the docs.
Head over to the docs.
FAQs
Mermaid to Excalidraw Diagrams
The npm package @excalidraw/mermaid-to-excalidraw receives a total of 33,107 weekly downloads. As such, @excalidraw/mermaid-to-excalidraw popularity was classified as popular.
We found that @excalidraw/mermaid-to-excalidraw demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.