File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 8181<script >
8282import debounce from ' debounce'
8383import { NodeViewWrapper , NodeViewContent } from ' @tiptap/vue-2'
84+ import { useIsDarkTheme } from ' @nextcloud/vue'
8485import NcActions from ' @nextcloud/vue/components/NcActions'
8586import NcActionButton from ' @nextcloud/vue/components/NcActionButton'
8687import NcActionInput from ' @nextcloud/vue/components/NcActionInput'
@@ -130,7 +131,9 @@ export default {
130131 },
131132 },
132133 setup () {
134+ const isDarkTheme = useIsDarkTheme ()
133135 return {
136+ isDarkTheme,
134137 /** The lazy loaded mermaid js module */
135138 mermaid: null ,
136139 }
@@ -208,7 +211,10 @@ export default {
208211 // lazy load mermaid on first real usage
209212 if (this .mermaid === null ) {
210213 this .mermaid = (await import (' mermaid' )).default
211- this .mermaid .initialize ({ startOnLoad: false })
214+ this .mermaid .initialize ({
215+ startOnLoad: false ,
216+ theme: this .isDarkTheme ? ' dark' : ' default' ,
217+ })
212218 }
213219 await this .mermaid .parse (textContent)
214220
You can’t perform that action at this time.
0 commit comments