Skip to content

Commit b36648a

Browse files
committed
feat: add codemirror support markmap syntax
Signed-off-by: Raccoon <raccoon@hackmd.io>
1 parent e8b1a67 commit b36648a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

public/js/lib/editor/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,14 @@ export default class Editor {
139139
return null
140140
}
141141
}
142+
142143
CodeMirror.defineMode('vega', function (config, modeConfig) {
143144
return CodeMirror.overlayMode(CodeMirror.getMode(config, 'application/ld+json'), ignoreOverlay)
144145
})
146+
147+
CodeMirror.defineMode('markmap', function (config, modeConfig) {
148+
return CodeMirror.overlayMode(CodeMirror.getMode(config, 'gfm'), ignoreOverlay)
149+
})
145150
}
146151

147152
on (event, cb) {

0 commit comments

Comments
 (0)