mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
Fix inseration position
This commit is contained in:
@@ -199,8 +199,9 @@ export default class CodeEditor extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
insertImageMd (imageMd) {
|
insertImageMd (imageMd) {
|
||||||
|
const textarea = this.editor.getInputField()
|
||||||
const cm = this.editor
|
const cm = this.editor
|
||||||
cm.setValue(cm.getValue() + imageMd)
|
textarea.value = `${textarea.value.substr(0, textarea.selectionStart)}${imageMd}${textarea.value.substr(textarea.selectionEnd)}`
|
||||||
}
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
|
|||||||
Reference in New Issue
Block a user