Skip to content

Commit 40f1bf0

Browse files
committed
Updated readme.
1 parent 42d7d77 commit 40f1bf0

File tree

2 files changed

+8
-15
lines changed

2 files changed

+8
-15
lines changed

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"standard.enable": false,
3939
"markdown.extension.toc.levels": "2..6",
4040
"editor.codeActionsOnSave": {
41-
"source.fixAll.eslint": true
41+
"source.fixAll.eslint": "explicit"
4242
},
4343
"files.watcherExclude": {
4444
"**/target": true

README.md

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -118,23 +118,15 @@ So you should have the following in your html page in order for the mermaid text
118118
<script>mermaid.initialize({startOnLoad:true});</script>
119119
```
120120

121-
Details [here](https://mermaidjs.github.io/#/usage?id=simple-usage-on-a-web-page).
121+
Details [here](https://mermaid.js.org/config/usage.html).
122122

123-
When using some sort of framework, be aware that `mermaid.initialize` would have to be called after the page has loaded. For example, with vue.js, this could look like:
123+
When using some sort of framework, be aware that `mermaid.initialize` would have to be called after the page has loaded. For example, with vue.js or nuxt.js, this could look like:
124124

125125
```javascript
126-
<script>
127-
let mermaid = null
128-
export default {
129-
mounted() {
130-
if (mermaid == null) {
131-
mermaid = require('mermaid')
132-
}
133-
mermaid.initialize({
134-
startOnLoad: true,
135-
theme: 'forest'
136-
})
137-
}
126+
<script setup>
127+
import mermaid from 'mermaid'
128+
mermaid.initialize({ startOnLoad: false });
129+
await mermaid.run()
138130
}
139131
</script>
140132
```
@@ -173,6 +165,7 @@ Here are some alternative npm packages:
173165
- [GitHub - gmunguia/markdown-it-plantuml: plantuml diagrams in your markdown](https://github.com/gmunguia/markdown-it-plantuml)
174166
- [GitHub - tylingsoft/markdown-it-mermaid: Mermaid plugin for markdown-it](https://github.com/tylingsoft/markdown-it-mermaid)
175167
- [GitHub - liradb2000/markdown-it-mermaid: Mermaid plugin for markdown-it](https://github.com/liradb2000/markdown-it-mermaid)
168+
- [GitHub - https://github.com/DatatracCorporation/markdown-it-mermaid](https://github.com/DatatracCorporation/markdown-it-mermaid)
176169

177170
## License
178171

0 commit comments

Comments
 (0)