mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-08 10:06:40 +02:00
docs: ESM import
This commit is contained in:
@@ -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.
|
The example below show an outline of how this could be used. The example just logs the resulting SVG to the JavaScript console.
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script src="mermaid.js"></script>
|
<script type="module">
|
||||||
|
import mermaid from './mermaid.mjs';
|
||||||
<script>
|
|
||||||
mermaid.mermaidAPI.initialize({ startOnLoad: false });
|
mermaid.mermaidAPI.initialize({ startOnLoad: false });
|
||||||
$(function () {
|
$(function () {
|
||||||
// Example of using the API var
|
// Example of using the API var
|
||||||
|
@@ -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.
|
The example below show an outline of how this could be used. The example just logs the resulting SVG to the JavaScript console.
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script src="mermaid.js"></script>
|
<script type="module">
|
||||||
|
import mermaid from './mermaid.mjs';
|
||||||
<script>
|
|
||||||
mermaid.mermaidAPI.initialize({ startOnLoad: false });
|
mermaid.mermaidAPI.initialize({ startOnLoad: false });
|
||||||
$(function () {
|
$(function () {
|
||||||
// Example of using the API var
|
// Example of using the API var
|
||||||
|
Reference in New Issue
Block a user