SolveBeam Diagrams with Mermaid adds a block for creating diagrams and visualizations with
Mermaid. Enter Mermaid syntax in the block editor and
the diagram is rendered in the editor and on the front end.
Mermaid is rendered locally in the browser. This plugin does not require an
external account or service to render diagrams.
This plugin ships compiled (minified) JavaScript and CSS in the blocks/
folder. The human-readable source code of everything in that folder is
publicly available:
blocks-src/ folder,package.json.blocks/mermaid-diagram/ – compiled from blocks-src/mermaid-diagram/index.js, view.js, editor.css, style.css and block.json),blocks/*.js (numbered files such as blocks/8726.js) – chunks that webpackThe Mermaid dependencies bundled in these chunks, with their public source code:
The compiled files are built with @wordpress/scripts
(webpack). Node.js and npm are required.
npm installnpm run buildThis compiles blocks-src/ into blocks/. Use npm run start to build in
development mode and watch for changes; development builds are not minified.
This plugin bundles Mermaid, which is
available under the MIT License. The Mermaid license is available at
https://github.com/mermaid-js/mermaid/blob/develop/LICENSE.
The dependencies of Mermaid listed above are available under their own open
source licenses, which can be found in their repositories.