tinymce / tinymce-react

Offical TinyMCE React component
MIT License
937 stars 152 forks source link

Option to debounce onEditorChange calls #473

Closed ThiefMaster closed 4 months ago

ThiefMaster commented 9 months ago

This would allow making the editor a controlled component while greatly reducing performance issues while typing.

Currently I'd have to implement all the events manually, because while I could debounce the callback passed to onEditorChange, this would not help because getContent is called internally.

The debouncing would also work pretty nicely together with the auto-rollback because the two timeouts could be aligned (rollback being slightly higher than debounce).

TinyITAdmin commented 9 months ago

Internal Ref: INT-3234

danoaky-tiny commented 7 months ago

This may work, but it's worth noting that if you're worried about efficiency, you might be better off with an uncontrolled editor and just query the editor's content when you need it.

Introducing a debounce to onEditorChange could cause some unreliable behaviour with content being mismatched if were to go out of sync. But in saying that it could be worth a try, so you're more than welcome to put in a PR for your suggestion and we can discuss it further.

github-actions[bot] commented 6 months ago

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.

ThiefMaster commented 6 months ago

please keep it open

github-actions[bot] commented 5 months ago

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.