@ysuzuki19/remark-mermaid
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

@ysuzuki19/remark-mermaid

remark plugin for mermaid in markdown.

install

$ npm i @ysuzuki19/remark-mermaid mermaid

use

import remarkMermaid from '@ysuzuki19/remark-mermaid';

...

async function main() {
  await unified()
    .use(remarkMermaid)
    .process(...)
}

For visualize mermaid, you must to run mermaid.init(); in frontend code.

Because this plugin only transform mermaid code block into <div class="mermaid">.

markdown -> html

```mermaid
graph TD;
  A-->B;
  B-->C;
```
<div class="mermaid">graph TD; A-->B; B-->C;</div>

Readme

Keywords

Package Sidebar

Install

npm i @ysuzuki19/remark-mermaid

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

3.46 kB

Total Files

5

Last publish

Collaborators

  • ysuzuki19