@Change doesn't fire on paste
andreixk opened this issue · 2 comments
andreixk commented
When content is changed by right clicking inside the editor and selecting paste
, the @change
event doesn't trigger. It seems the only way to trigger @change
event is to press a key inside the editor.
mi1971 commented
Any news on this? It's causing us issues too.
foreverplay commented
I solved the problem by listen "DOMSubtreeModified"
mounted() {
const el = this.$refs.vueHtml5Editor.$el;
const content = el.querySelector(".content");
content.addEventListener(
"DOMSubtreeModified",
() => {
//manual trigger ‘change’
this.$emit("change", content.innerHTML);
},
false
);
},