fix simditor upload image problems

This commit is contained in:
zema1 2017-12-01 19:54:35 +08:00
parent 3c983af13a
commit df3a76c7e4

View File

@ -30,7 +30,6 @@
Simditor.locale = 'en-US'
this.editor = new Simditor({
textarea: this.$refs.editor,
placeholder: this.placeholder,
toolbar: this.toolbar,
pasteImage: true,
markdown: true,
@ -42,15 +41,13 @@
leaveConfirm: 'Uploading is in progress, are you sure to leave this page?'
}
})
this.editor.on('valuechanged', (e, src) => {
this.currentValue = this.editor.getValue()
})
this.editor.on('decorate', (e, src) => {
this.currentValue = this.editor.getValue()
})
let simditorBody = this.$el.parentNode.querySelector('.simditor-body')
if (simditorBody !== undefined) {
simditorBody.oninput = () => {
this.currentValue = this.editor.getValue()
}
}
this.editor.setValue(this.value)
},
watch: {