Closed m4r71n closed 6 months ago
Ref: INT-3226
I've been able to replicate your case with 2 identical logs after pasting over some content, see here: https://codesandbox.io/p/sandbox/runtime-water-gff5js
This is because onEditorChange
is called for several different TinyMCE events, so it's possible for some events to fire at the same time.
As a workaround, you could try and debounce calls made to your onEditorChange
callback.
Let us know if that helps.
This issue is stale because it has been open for 30 days with no activity. Respond with a comment or this will be closed in 7 days.
What is the current behavior?
onEditorChange
is fired three times if text was selected and is overwritten by paste. Also the content is wrong. Reproducible on https://tinymce.github.io/tinymce-react/iframe.html?id=editor--controlled-input&viewMode=story with Firefox 117, Edge and Chrome 116.Select some text and paste other text with
ctrl+v
. Please see attached video: onEditorChange.webm The logpoint in the video is on:What is the expected behavior?
The correct content with the pasted text.