Merge branch 'master' into sidv/jsdelivr

* master:
  doc: Add mindmap integration docs
  fix: Fetch depth
  fix: Fetch depth
  fix: Fetch depth
  fix: Add commit count to release preview
  fix: Add commit count to release preview
  chore: Add working directory
  fix: release-preview-publish.yml
  Fix #3799: Remove `type` from package.json
This commit is contained in:
Sidharth Vinod
2022-12-01 11:20:16 +05:30
6 changed files with 51 additions and 8 deletions

View File

@@ -253,3 +253,17 @@ Root
B
C
```
## Integrating with your library/website.
Mindmap uses the experimental lazy loading & async rendering features which could change in the future.
```html
<script type="module">
import mermaid from 'https://unpkg.com/mermaid@9/dist/mermaid.esm.min.mjs';
import mindmap from 'https://unpkg.com/@mermaid-js/mermaid-mindmap@9/dist/mermaid-mindmap.esm.min.mjs';
await mermaid.registerExternalDiagrams([mindmap]);
</script>
```
You can also refer the implementation in the live editor [here](https://github.com/mermaid-js/mermaid-live-editor/blob/fcf53c98c25604c90a218104268c339be53035a6/src/lib/util/mermaid.ts) to see how the async loading is done.