Skip to content

Commit de58991

Browse files
Merge pull request #105 from JankariTech/mermaid
support mermaid.js
2 parents 67df1d6 + 1269d6c commit de58991

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

package-common.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
},
1616
"dependencies": {
1717
"@types/reveal.js": "^4.4.8",
18-
"reveal.js": "^5.1.0"
18+
"reveal.js": "^5.1.0",
19+
"reveal.js-mermaid-plugin": "^11.4.1"
1920
},
2021
"devDependencies": {
2122
"@babel/eslint-parser": "^7.24.5",

src/App.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import { Resource } from '@ownclouders/web-client/src'
3333
import Reveal from 'reveal.js'
3434
import RevealMarkdown from 'reveal.js/plugin/markdown/markdown'
3535
import RevealHighlight from 'reveal.js/plugin/highlight/highlight'
36+
import RevealMermaid from 'reveal.js-mermaid-plugin/plugin/mermaid/mermaid'
3637
3738
import 'reveal.js/dist/reveal.css'
3839
import 'reveal.js/plugin/highlight/monokai.css'
@@ -101,7 +102,7 @@ onMounted(async () => {
101102
})
102103
103104
reveal = new Reveal(unref(revealContainer), {
104-
plugins: [RevealMarkdown, RevealHighlight]
105+
plugins: [RevealMarkdown, RevealHighlight, RevealMermaid]
105106
})
106107
107108
await reveal.initialize({

tests/e2e/filesForUpload/test-markdown.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,14 @@ We are using Triple Dash "---" as a slide separator
5252
# Title for slide 3
5353
Content of slide 3
5454
```
55+
---
56+
### Flowcharts with Mermaid
57+
58+
```mermaid
59+
flowchart LR
60+
A[Boss tells <br>you to create <br>a presentation] --> B{Use Powerpoint or a MD file?};
61+
B -- Powerpoint --> C(Frustration 😫);
62+
C --> D[Rethink 🤔];
63+
D --> B;
64+
B -- MD file 🧑‍💻 ----> E[Job done 👍];
65+
```

0 commit comments

Comments
 (0)