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_STATEwhile the tool is not active — withoutedit-textit cannot be activated.
Example
TypeScript
await viewer.tools.editText.commit();