mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +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()
|
this.updateDefaultKeyMap()
|
||||||
|
|
||||||
|
const checkMarkdownNoteIsOpening = this.props.mode === 'Boost Flavored Markdown'
|
||||||
this.value = this.props.value
|
this.value = this.props.value
|
||||||
this.editor = CodeMirror(this.refs.root, {
|
this.editor = CodeMirror(this.refs.root, {
|
||||||
rulers: buildCMRulers(rulers, enableRulers),
|
rulers: buildCMRulers(rulers, enableRulers),
|
||||||
@@ -377,10 +378,10 @@ export default class CodeEditor extends React.Component {
|
|||||||
inputStyle: 'textarea',
|
inputStyle: 'textarea',
|
||||||
dragDrop: false,
|
dragDrop: false,
|
||||||
foldGutter: true,
|
foldGutter: true,
|
||||||
lint: {
|
lint: checkMarkdownNoteIsOpening ? {
|
||||||
'getAnnotations': validatorOfMarkdown,
|
'getAnnotations': validatorOfMarkdown,
|
||||||
'async': true
|
'async': true
|
||||||
},
|
} : false,
|
||||||
gutters: ['CodeMirror-linenumbers', 'CodeMirror-foldgutter', 'CodeMirror-lint-markers'],
|
gutters: ['CodeMirror-linenumbers', 'CodeMirror-foldgutter', 'CodeMirror-lint-markers'],
|
||||||
autoCloseBrackets: {
|
autoCloseBrackets: {
|
||||||
pairs: this.props.matchingPairs,
|
pairs: this.props.matchingPairs,
|
||||||
|
|||||||
Reference in New Issue
Block a user