onEditorChange triggers on first render

Aperta
#587 15 commenti 3 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

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

Direzione di ricerca

Start with the linked CodeSandbox reproduction, which points to src/index.tsx, and confirm whether onEditorChange fires on the first render with either value or initialValue. Then trace how the TinyMCE React component invokes the callback; done means the callback does not fire until the editor content actually changes.

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

Descrizione

What is the current behavior?

The onEditorChange callback fires immidiatelly on the first render. I'm not sure if thats expected but I would expect to not fire since there was no actual change to the content.

Same happens with either the value or initialValue property.

Please provide the steps to reproduce and if possible a minimal demo of the problem via codesandbox.io or similar.

https://codesandbox.io/p/devbox/vibrant-wilson-ms4v5p

What is the expected behavior?

onEditorChange should not fire

Which versions of TinyMCE, and which browser / OS are affected by this issue? Did this work in previous versions of TinyMCE or tinymce-react?

version 4.3.2

Lingua principale
TypeScript
Stelle
1.1k
Fork
167
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-react

Tutte le issue di tinymce/tinymce-react

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.