tinymce.util.Delay

Utility class for working with delayed actions like setTimeout.

Summary

Methods

Name Summary Defined by

setEditorInterval()

Sets an interval timer it’s similar to setInterval except that it checks if the editor instance is still alive when the callback gets executed.

Delay

setEditorTimeout()

Sets an editor timeout it’s similar to setTimeout except that it checks if the editor instance is still alive when the callback gets executed.

Delay

Methods

setEditorInterval()

setEditorInterval(callback: Function, time: Number): Number

Sets an interval timer it’s similar to setInterval except that it checks if the editor instance is still alive when the callback gets executed.

Parameters

  • callback (Function) - Callback to execute when interval time runs out.

  • time (Number) - Optional time to wait before the callback is executed, defaults to 0.

Return value

  • Number - Timeout id number.


setEditorTimeout()

setEditorTimeout(editor: tinymce.Editor, callback: Function, time: Number): Number

Sets an editor timeout it’s similar to setTimeout except that it checks if the editor instance is still alive when the callback gets executed.

Parameters

  • editor (Editor) - Editor instance to check the removed state on.

  • callback (Function) - Callback to execute when timer runs out.

  • time (Number) - Optional time to wait before the callback is executed, defaults to 0.

Return value

  • Number - Timeout id number.