-
Notifications
You must be signed in to change notification settings - Fork 218
Open
Labels
Description
The current behavior is described in detail in #106 and #113: Editor get loaded correctly on first time it is shown, then second and later on it became blank / disabled / zombie / frozzen / etc.
The description of the real internal problem is also in those tickets. I want to show you my workaround, ugly but functional: reloading the component with v-if. Yes, it's not the best, but it works.
Here is it the component used:
<b-modal ref="modal_editor">
<vue-mce v-if="show_editor" :config="config_mce" v-model="content"/>
</b-modal>
The magic code:
forceRerender () {
this.show_editor = false;
this.$nextTick(() => { this.show_editor = true })
},
How to use it:
this.forceRerender()
this.$refs.modal_editor.show()
The rerender function (and other options that didn't work this time) comes from the following reference: https://michaelnthiessen.com/force-re-render/
My environment:
"bootstrap": "^4.4.1",
"bootstrap-vue": "^2.5.0",
"tinymce": "^5.1.1",
"vue": "^2.6.11",
"vue-mce": "^1.5.3",
Regards.
Reactions are currently unavailable