Open enoh-barbu opened 4 months ago
Could you please provide a code sandbox or a code snippet? I've tried replicating with the React integration, but I've only found this problem when deleting a selection of text, nothing with keyup events. And this can also be replicated in core TinyMCE, see this TinyMCE fiddle. In which case this would be an issue to do with core and not the React integration.
@danoaky-tiny I have updated my description, and after some debugging I found out that the bug can be reproduced if:
Just go ahead on that example, paste/insert an image, and start typing in the editor
Internal ref: INT-3288
The problem is there's a required call to editor.getContent
within onEditorChange
, in order to supply the content for the callback. This is where the setup you provided will cause an image refetch.
If applicable, you could opt to use the editor as an uncontrolled component and call getContent
when you need it.
Another solution that could work (depending on your use case) is to have something like a changeEvents
prop added. This would be used to override the default list of events that onEditorChange
fires on. So to fix this particular case, you'd want to not fire on the 'input'
event.
Otherwise this would need to be addressed as a core TinyMCE issue. As it's replicable in a TinyMCE fiddle and in the Angular integration too, see: https://codesandbox.io/p/sandbox/int-3288-539h9p
For now I just removed codesample plugin, as I don't use it at all
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.
Not sure what prio has this one, but I think it's still an issue which might need some attention, if possible
Same bug described as here https://github.com/tinymce/tinymce-angular/issues/138
https://stackblitz.com/edit/vitejs-vite-zwyxe1?file=src%2FApp.tsx