Fix tinymce memory leak [SCI-7138]

This commit is contained in:
Anton 2022-08-26 10:52:55 +02:00
parent 55461a4e36
commit 81dd259c25

View file

@ -75,7 +75,6 @@
},
data() {
return {
editorInstance: null,
characterCount: 0,
blurEventHandler: null,
active: false
@ -97,6 +96,9 @@
}
},
computed: {
editorInstance() {
return tinyMCE.editors[0];
},
error() {
if(this.characterLimit && this.characterCount > this.characterLimit) {
return(
@ -131,8 +133,7 @@
this.$emit('update', data)
}
this.$emit('editingDisabled')
}).then((editorInstance) => {
this.editorInstance = editorInstance[0]; // TinyMCE initialization returns an array
}).then(() => {
this.active = true;
this.initCharacterCount();
});