SaveDocumentCallback Function
Description
Callback function receiving the document data when saving a document or a selection.
Syntax
function(<SaveDocumentResult> result)Examples
The following example demonstrates SaveDocumentCallback in a practical document-editing workflow. Callback function receiving the document data when saving a document or a selection.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function saveDocumentCallback(result) {
console.log("result:", result);
}
function useSaveDocumentCallback(editableRegion) {
editableRegion.save(
TXTextControl.StreamType.HTMLFormat,
saveDocumentCallback,
{ creatorApplication: "Document Editor sample" },
onTxError
);
}