Workaround for new Boostrap-vue when editor became zombie
Nobody has claimed this yet.
- #496 by @ELHart05 — closed without merging
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- frontend
Research direction
Start with the related issues #106 and #113 for the reported repeated-use failure, then review the open pull request #496 before considering any work. The issue describes a Vue modal containing vue-mce and a rerender workaround; done means the editor works on later openings without becoming blank or disabled.
Written by the indexing model from the issue text.
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.
- Dominant language
- TypeScript
- Stars
- 2.2k
- Forks
- 217
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from tinymce/tinymce-vue
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
tinymce/tinymce-vue#482 · 7 comments · 2 reactions ·
-
GitHub status: escalated
Difficulty 3/5 1-2 days Newbie friendliness 52/100
tinymce/tinymce-vue#350 · 5 comments · 1 reaction ·
-
GitHub status: escalated
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
tinymce/tinymce-vue#266 · 5 comments ·
-
bug GitHub status: escalated
Difficulty 4/5 3-5 days Newbie friendliness 25/100
tinymce/tinymce-vue#230 · 11 comments · 3 reactions ·
All issues in tinymce/tinymce-vue
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
zabuton-app/meguri#875 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
iruzen-dono/workless#117 ·
Maintainers usually reply within 1 day
-
area:api area:web wave wave:trivial
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
vetro-protocol/vetro-monorepo#1321 ·
Maintainers usually reply within 1 day