TX Text Control .NET Server

Javascript: Table.getID Method

Method|Introduced in 28.0

Description

Gets the table's identifier.

Syntax

<void> Table.getID(<RequestNumberCallback> callback)

Parameters

ParameterDescription
callback

Receives the identifier as parameter.

Examples

The following example demonstrates Table.getID in a practical document-editing workflow. It gets the table's identifier.

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

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.getID(
            function(result) {
                console.log("get id result:", result);
            }
        );
    }, onTxError);
}, onTxError);