DS Server

LoadDocumentCallback Function

Function

Description

Callback function which receives information about a loaded document.

Syntax

function(<LoadDocumentCallbackData> result)

Examples

The following example demonstrates LoadDocumentCallback in a practical document-editing workflow. Callback function which receives information about a loaded document.

function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

function loadDocumentCallback(result) {
    console.log("result:", result);
}

TXTextControl.load(
    TXTextControl.StreamType.HTMLFormat,
    "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAFgAH/qbPzWQAAAABJRU5ErkJggg==",
    loadDocumentCallback,
    { loadImages: true, loadHypertextLinks: true },
    onTxError
);