mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
minor bug fix
use mime for syntax mode instead of mode fix style of markdown
This commit is contained in:
@@ -93,7 +93,8 @@ export default class CodeEditor extends React.Component {
|
||||
setMode (mode) {
|
||||
let syntax = CodeMirror.findModeByName(pass(mode))
|
||||
if (syntax == null) syntax = CodeMirror.findModeByName('Plain Text')
|
||||
this.editor.setOption('mode', syntax.mode)
|
||||
|
||||
this.editor.setOption('mode', syntax.mime)
|
||||
CodeMirror.autoLoadMode(this.editor, syntax.mode)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user