add editorcontent component

This commit is contained in:
Philipp Kühn
2020-03-08 23:25:48 +01:00
parent a067259da1
commit a580e257f5
5 changed files with 65 additions and 9 deletions

View File

@@ -0,0 +1,32 @@
import Vue from 'vue'
export default Vue.extend({
props: {
editor: {
default: null,
type: Object,
},
},
watch: {
editor: {
immediate: true,
handler(editor) {
if (editor && editor.element) {
this.$nextTick(() => {
this.$el.appendChild(editor.element.firstChild)
// editor.setParentComponent(this)
})
}
},
},
},
render(createElement) {
return createElement('div')
},
beforeDestroy() {
this.editor.element = this.$el
},
})