1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

added to check Markdown Note is opening

This commit is contained in:
roottool
2019-02-02 14:59:04 +09:00
parent 59b441e524
commit c15cc2ecfc

View File

@@ -361,6 +361,7 @@ export default class CodeEditor extends React.Component {
this.updateDefaultKeyMap()
const checkMarkdownNoteIsOpening = this.props.mode === 'Boost Flavored Markdown'
this.value = this.props.value
this.editor = CodeMirror(this.refs.root, {
rulers: buildCMRulers(rulers, enableRulers),
@@ -377,10 +378,10 @@ export default class CodeEditor extends React.Component {
inputStyle: 'textarea',
dragDrop: false,
foldGutter: true,
lint: {
lint: checkMarkdownNoteIsOpening ? {
'getAnnotations': validatorOfMarkdown,
'async': true
},
} : false,
gutters: ['CodeMirror-linenumbers', 'CodeMirror-foldgutter', 'CodeMirror-lint-markers'],
autoCloseBrackets: {
pairs: this.props.matchingPairs,