Web SDKv1.0.0

EditTextToolApi.commit()

Writes every pending edit into the document and reports textChanged. Deactivates the tool, as pressing Save in the toolbar does; re-activate before further edits, and re-read listBlocks() — every block id from before a commit is stale.
methodEditingsince 1.0.0

Signature

commit(): Promise<void>

Returns

Promise<void>

Throws

  • INVALID_STATE while the tool is not active — without edit-text it cannot be activated.

Example

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

More in EditTextToolApi