Skip to content

Commit

Permalink
Fix timeline and mindmap
Browse files Browse the repository at this point in the history
  • Loading branch information
sidharthv96 committed Feb 16, 2023
1 parent 276f042 commit b22978d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
12 changes: 7 additions & 5 deletions docs/syntax/mindmap.md
Expand Up @@ -270,16 +270,18 @@ You can still use the pre 9.4.0 method to add mermaid with mindmaps to a web pag

From version 9.4.0 you can simplify this code to:

<script type="module">
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@9/dist/mermaid.esm.min.mjs';
</script>
```html
<script type="module">
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@9/dist/mermaid.esm.min.mjs';
</script>
```

or is you prefere not using an esm package:
or if you prefer not using the ESM package:

```html
<script src="https://cdn.jsdelivr.net/npm/mermaid@9/dist/mermaid.min.js"></script>
```

Note that more complex integrations that use the **render** function directly need to use the **renderAsync** method instead in order to render mind maps.

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.
You can also refer the implementation in the live editor [here](https://github.com/mermaid-js/mermaid-live-editor/blob/develop/src/lib/util/mermaid.ts) to see how the async loading is done.
4 changes: 2 additions & 2 deletions docs/syntax/timeline.md
Expand Up @@ -469,6 +469,6 @@ You can use this method to add mermaid including the timeline diagram to a web p
<script src="https://cdn.jsdelivr.net/npm/mermaid@9/dist/mermaid.min.js"></script>
```
Note that more complex integrations that the **render** function directly need to use the **renderAsync** method instead in order to render mind maps.
Note that more complex integrations that the **render** function directly need to use the **renderAsync** method instead in order to render timeline.
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.
You can also refer the implementation in the live editor [here](https://github.com/mermaid-js/mermaid-live-editor/blob/develop/src/lib/util/mermaid.ts) to see how the async loading is done.
6 changes: 3 additions & 3 deletions packages/mermaid/src/docs/syntax/mindmap.md
Expand Up @@ -178,18 +178,18 @@ You can still use the pre 9.4.0 method to add mermaid with mindmaps to a web pag

From version 9.4.0 you can simplify this code to:

```
```html
<script type="module">
import mermaid from '<CDN_URL>/mermaid@<MERMAID_VERSION>/dist/mermaid.esm.min.mjs';
</script>
```

or is you prefere not using an esm package:
or if you prefer not using the ESM package:

```html
<script src="<CDN_URL>/mermaid@<MERMAID_VERSION>/dist/mermaid.min.js"></script>
```

Note that more complex integrations that use the **render** function directly need to use the **renderAsync** method instead in order to render mind maps.

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.
You can also refer the implementation in the live editor [here](https://github.com/mermaid-js/mermaid-live-editor/blob/develop/src/lib/util/mermaid.ts) to see how the async loading is done.
4 changes: 2 additions & 2 deletions packages/mermaid/src/docs/syntax/timeline.md
Expand Up @@ -301,6 +301,6 @@ You can use this method to add mermaid including the timeline diagram to a web p
<script src="<CDN_URL>/mermaid@<MERMAID_VERSION>/dist/mermaid.min.js"></script>
```
Note that more complex integrations that the **render** function directly need to use the **renderAsync** method instead in order to render mind maps.
Note that more complex integrations that the **render** function directly need to use the **renderAsync** method instead in order to render timeline.
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.
You can also refer the implementation in the live editor [here](https://github.com/mermaid-js/mermaid-live-editor/blob/develop/src/lib/util/mermaid.ts) to see how the async loading is done.

0 comments on commit b22978d

Please sign in to comment.