Open Chris2011 opened 4 years ago
Maybe I missed smth and the solution is easy :)
I managed to made this work using computed property with getter and setter
props: {
value: { type: string }
},
computed: {
val: {
get() { return this.value },
set(value) { this.$emit('input', value) }
}
}
then I use the
<wysiwyg v-model="val" />
if you other solution, please let me know :)
Context: I use this editor inside of a child component so I input my content from the parent. When I use v-model I got the error of vue, that I shouldn't update props directly. So I switched from v-model to :value.
Expected behaviour: It should show the content inside of the editor
What happens: Nothing is shown in the editor.
Code: Parent component:
Child component: