feat: add codemirror support markmap syntax

Signed-off-by: Raccoon <raccoon@hackmd.io>
This commit is contained in:
Raccoon 2020-04-13 15:02:44 +08:00
parent e8b1a679b3
commit b36648a928
No known key found for this signature in database
GPG Key ID: 06770355DC9ECD38
1 changed files with 5 additions and 0 deletions

View File

@ -139,9 +139,14 @@ export default class Editor {
return null return null
} }
} }
CodeMirror.defineMode('vega', function (config, modeConfig) { CodeMirror.defineMode('vega', function (config, modeConfig) {
return CodeMirror.overlayMode(CodeMirror.getMode(config, 'application/ld+json'), ignoreOverlay) return CodeMirror.overlayMode(CodeMirror.getMode(config, 'application/ld+json'), ignoreOverlay)
}) })
CodeMirror.defineMode('markmap', function (config, modeConfig) {
return CodeMirror.overlayMode(CodeMirror.getMode(config, 'gfm'), ignoreOverlay)
})
} }
on (event, cb) { on (event, cb) {