EditTextToolApi.hasPendingEdits
Whether edits are pending — not yet in the document, so not yet in viewer.hasUnsavedChanges. Every way of leaving the tool writes them, and so does an export from createExporter(), so this is for a host's own
beforeunload warning beside hasUnsavedChanges; false while the tool is not active.getterReadingsince 1.0.0
Signature
get hasPendingEdits(): boolean
Returns
boolean
Example
TypeScript
window.addEventListener('beforeunload', (e) => { if (viewer.hasUnsavedChanges || viewer.tools.editText.hasPendingEdits) e.preventDefault(); });