TX Text Control .NET Server

RequestParagraphCallback Function

Function

Description

Callback function for requesting a Paragraph object.

Syntax

function(<Paragraph> result)

Examples

The following example demonstrates RequestParagraphCallback in a practical document-editing workflow. Callback function for requesting a Paragraph object.

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

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

TXTextControl.textParts.getMainText(function(mainText) {
    const paragraphs = mainText.paragraphs;
    paragraphs.getItem(-1, requestParagraphCallback, onTxError);
}, onTxError);