EditTextToolApi.cancel()
Discards every pending edit — the one way to: leaving the tool by any other means writes them. Deactivates the tool, as pressing Escape in the toolbar does.
methodEditingsince 1.0.0
Signature
cancel(): Promise<void>
Returns
Promise<void> Resolves once discarded.
Throws
INVALID_STATEwhile the tool is not active — withoutedit-textit cannot be activated.
Example
TypeScript
await viewer.tools.editText.cancel();