TX Text Control .NET Server

RequestChangeKindCallback Function

Function

Description

Callback function for requests expecting a ChangeKind value.

Syntax

function(<ChangeKind> changeKind)

Examples

The following example demonstrates RequestChangeKindCallback in a practical document-editing workflow. Callback function for requests expecting a ChangeKind value.

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

function requestChangeKindCallback(changeKind) {
    console.log("change kind:", changeKind);
}

TXTextControl.textParts.getMainText(function(mainText) {
    const trackedChanges = mainText.trackedChanges;
    trackedChanges.getItem(function(trackedChange) {
        if (!trackedChange) {
            console.warn("No tracked change is available at the current input position.");
            return;
        }
    
        trackedChange.getChangeKind(requestChangeKindCallback, onTxError);
    }, onTxError);
}, onTxError);