@leptosia/docute-mermaid
Using Mermaid in Docute.
Last updated 2 years ago by egoist .
MIT · Original npm · Tarball · package.json
$ cnpm install @leptosia/docute-mermaid 
SYNC missed versions from official npm registry.

@leptosia/docute-mermaid

Using Mermaid in Docute.

Usage

First load this plugin via <script> tag:

<!-- Load these after docute.js -->
<script src="https://cdn.jsdelivr.net/npm/mermaid@8.0.0-rc.8/dist/mermaid.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@leptosia/docute-mermaid@1/dist/index.min.js"></script>

This plugin is exposed as window.docuteMermaid:

new Docute({
  // ...
  plugins: [
    docuteMermaid()
  ]
})

Then you can use code fences to write mermaid code to generate charts:

```mermaid
graph TD;
    A-->B;
    A-->C;
    B-->D;
    C-->D;
```

options

options.initOpts

Options for mermaid.init().

options.evaluateOnly

  • Type: boolean
  • Default: false

Only convert code to chart only when evaluate: true:

```mermaid {evaluate: true}
graph TD;
    A-->B;
    A-->C;
    B-->D;
    C-->D;
```

License

MIT © LEPTOSIA

Current Tags

  • 1.0.4                                ...           latest (2 years ago)

5 Versions

  • 1.0.4                                ...           2 years ago
  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 1
Last Month 2
Dependencies (0)
None
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |