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,11 +46,13 @@ ...@@ -46,11 +46,13 @@
}, },
watch: { watch: {
value (val) { value (val) {
if (this.instance) {
let html = this.instance.getData(); let html = this.instance.getData();
if (val !== html) { if (val !== html) {
this.instance.setData(val); this.instance.setData(val);
} }
} }
}
}, },
mounted () { mounted () {
if (typeof CKEDITOR === 'undefined') { if (typeof CKEDITOR === 'undefined') {
......
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