You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the current behavior?
Currently while editing long texts on a controller editor, the validation located on the handleEditorChange function causes the editor to run the tinyMCE native function getContent while another request is already running, thus making the editor too slow.
What is the current behavior?
Currently while editing long texts on a controller editor, the validation located on the handleEditorChange function causes the editor to run the tinyMCE native function getContent while another request is already running, thus making the editor too slow.
https://codesandbox.io/p/sandbox/tinymce-slow-4jlprj
What is the expected behavior?
Adding a simple debounce seens to fix the issue
`
private handleEditorChange = (_evt: EditorEvent) => {
debounce(() => {
const editor = this.editor;
if (editor && editor.initialized) {
const newContent = editor.getContent();
if (this.props.value !== undefined && this.props.value !== newContent && this.props.rollback !== false) {
// start a timer and revert to the value if not applied in time
if (!this.rollbackTimer) {
this.rollbackTimer = window.setTimeout(
this.rollbackChange,
typeof this.props.rollback === 'number' ? this.props.rollback : 200
);
}
}
};
`
Which versions of TinyMCE, and which browser / OS are affected by this issue? Did this work in previous versions of TinyMCE or
tinymce-react
?The text was updated successfully, but these errors were encountered: