docs: ESM import

This commit is contained in:
Sidharth Vinod 2022-10-08 09:40:54 +08:00
parent 8a2aea219e
commit 0261e7464a
No known key found for this signature in database
GPG Key ID: FB5CCD378D3907CD
2 changed files with 4 additions and 6 deletions

View File

@ -200,9 +200,8 @@ fetch the graph definition from the site (perhaps from a textarea), render it an
The example below show an outline of how this could be used. The example just logs the resulting SVG to the JavaScript console.
```html
<script src="mermaid.js"></script>
<script>
<script type="module">
import mermaid from './mermaid.mjs';
mermaid.mermaidAPI.initialize({ startOnLoad: false });
$(function () {
// Example of using the API var

View File

@ -200,9 +200,8 @@ fetch the graph definition from the site (perhaps from a textarea), render it an
The example below show an outline of how this could be used. The example just logs the resulting SVG to the JavaScript console.
```html
<script src="mermaid.js"></script>
<script>
<script type="module">
import mermaid from './mermaid.mjs';
mermaid.mermaidAPI.initialize({ startOnLoad: false });
$(function () {
// Example of using the API var