Web SDKv1.0.0

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_STATE while the tool is not active — without edit-text it cannot be activated.

Example

TypeScript
await viewer.tools.editText.cancel();

More in EditTextToolApi