JSPM

  • Created
  • Published
  • Downloads 51665
  • Score
    100M100P100Q168794F

Mermaid to Excalidraw Diagrams

Package Exports

  • @excalidraw/mermaid-to-excalidraw
  • @excalidraw/mermaid-to-excalidraw/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@excalidraw/mermaid-to-excalidraw) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

mermaid-to-excalidraw

Convert mermaid diagrams to excalidraw

Set up

Install packages:

yarn

Start development playground:

yarn start

Build command:

yarn build

Get started

Example code:

import { parseMermaidToExcalidraw } from "@excalidraw/mermaid-to-excalidraw";

try {
  const { elements, files } = await parseMermaid(diagramDefinition, {
    fontSize: DEFAULT_FONT_SIZE,
  });
  // Render elements and files on Excalidraw
} catch (e) {
  // Parse error, displaying error message to users
}

Playground

Try out here.

API

Head over to the docs.

Support new Diagram type

Head over to the docs.