Updating CkEditor component with upstream changes

parent 4a218171
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<script> <script>
// Source: https://github.com/dangvanthanh/vue-ckeditor2 // Source: https://github.com/dangvanthanh/vue-ckeditor2
let inc = 0 let inc = new Date().getTime();
export default { export default {
name: 'vue-ckeditor', name: 'vue-ckeditor',
props: { props: {
...@@ -46,9 +46,11 @@ ...@@ -46,9 +46,11 @@
}, },
watch: { watch: {
value (val) { value (val) {
let html = this.instance.getData(); if (this.instance) {
if (val !== html) { let html = this.instance.getData();
this.instance.setData(val); if (val !== html) {
this.instance.setData(val);
}
} }
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment