mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
Fixing code style probllems
This commit is contained in:
@@ -623,7 +623,7 @@ export default class CodeEditor extends React.Component {
|
|||||||
if (prevProps.spellCheck !== this.props.spellCheck) {
|
if (prevProps.spellCheck !== this.props.spellCheck) {
|
||||||
if (this.props.spellCheck === false) {
|
if (this.props.spellCheck === false) {
|
||||||
spellcheck.setLanguage(this.editor, spellcheck.SPELLCHECK_DISABLED)
|
spellcheck.setLanguage(this.editor, spellcheck.SPELLCHECK_DISABLED)
|
||||||
let elem = document.getElementById('editor-bottom-panel')
|
const elem = document.getElementById('editor-bottom-panel')
|
||||||
elem.parentNode.removeChild(elem)
|
elem.parentNode.removeChild(elem)
|
||||||
} else {
|
} else {
|
||||||
this.editor.addPanel(this.createSpellCheckPanel(), {position: 'bottom'})
|
this.editor.addPanel(this.createSpellCheckPanel(), {position: 'bottom'})
|
||||||
@@ -703,10 +703,9 @@ export default class CodeEditor extends React.Component {
|
|||||||
this.editor.replaceSelection(imageMd)
|
this.editor.replaceSelection(imageMd)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
handlePaste (editor, forceSmartPaste) {
|
handlePaste (editor, forceSmartPaste) {
|
||||||
const { storageKey, noteKey, fetchUrlTitle, enableSmartPaste } = this.props
|
const { storageKey, noteKey, fetchUrlTitle, enableSmartPaste } = this.props
|
||||||
|
|
||||||
const isURL = str => {
|
const isURL = str => {
|
||||||
const matcher = /^(?:\w+:)?\/\/([^\s\.]+\.\S{2}|localhost[\:?\d]*)\S*$/
|
const matcher = /^(?:\w+:)?\/\/([^\s\.]+\.\S{2}|localhost[\:?\d]*)\S*$/
|
||||||
return matcher.test(str)
|
return matcher.test(str)
|
||||||
|
|||||||
@@ -100,7 +100,6 @@ class UiTab extends React.Component {
|
|||||||
matchingTriples: this.refs.matchingTriples.value,
|
matchingTriples: this.refs.matchingTriples.value,
|
||||||
explodingPairs: this.refs.explodingPairs.value,
|
explodingPairs: this.refs.explodingPairs.value,
|
||||||
spellcheck: this.refs.spellcheck.checked,
|
spellcheck: this.refs.spellcheck.checked,
|
||||||
spellcheck: this.refs.spellcheck.checked,
|
|
||||||
enableSmartPaste: this.refs.enableSmartPaste.checked
|
enableSmartPaste: this.refs.enableSmartPaste.checked
|
||||||
},
|
},
|
||||||
preview: {
|
preview: {
|
||||||
|
|||||||
Reference in New Issue
Block a user