1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

fix: for ESLint

This commit is contained in:
sota1235
2017-03-21 15:14:03 +09:00
parent 1ab449cecf
commit 1d3e71cf49
5 changed files with 18 additions and 18 deletions

View File

@@ -161,7 +161,7 @@ class MarkdownEditor extends React.Component {
this.renderPreview(this.props.value)
}
handleKeyDown(e) {
handleKeyDown (e) {
if (this.state.status !== 'CODE') return false
const keyPressed = Object.assign(this.state.keyPressed, {
[e.key]: true
@@ -183,7 +183,7 @@ class MarkdownEditor extends React.Component {
const currentCaret = this.refs.code.editor.getCursor()
const cmDoc = this.refs.code.editor.getDoc()
cmDoc.replaceRange(mdElement, currentCaret)
this.refs.code.editor.setCursor({line: currentCaret.line, ch: currentCaret.ch + mdElement.length/2})
this.refs.code.editor.setCursor({ line: currentCaret.line, ch: currentCaret.ch + mdElement.length / 2 })
}
addMdBetweenWord (mdElement) {