TX Text Control .NET Server

RequestTableCallback Function

Function

Description

Callback function for requests expecting a Table object.

Syntax

function(<Table> table)

Examples

The following example demonstrates RequestTableCallback in a practical document-editing workflow. Callback function for requests expecting a Table object.

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

function requestTableCallback(table) {
    console.log("table:", table);
}

TXTextControl.textParts.getMainText(function(mainText) {
    const tables = mainText.tables;
    tables.getItem(function(table) {
        if (!table) {
            console.warn("No table is available at the current input position.");
            return;
        }
    
        table.getOuterMostTable(requestTableCallback, onTxError);
    }, onTxError);
}, onTxError);