mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 01:36:22 +00:00
added to check Markdown Note is opening
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user