Workaround for new Boostrap-vue when editor became zombie

Aperta
#131 9 commenti 5 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

  • #496 di @ELHart05 — chiusa senza merge

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
typescript
Ambito
frontend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

status: escalated

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.

Lingua principale
TypeScript
Stelle
2.2k
Fork
217
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di tinymce/tinymce-vue

Tutte le issue di tinymce/tinymce-vue

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.