TX Text Control .NET Server

Javascript: ParagraphFormat.getWidowOrphanLines Method

Method|Introduced in 26.0

Description

Gets the number of lines for widow/orphan control.

Syntax

<void> ParagraphFormat.getWidowOrphanLines(<RequestNumberCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Receives the number of lines for widow/orphan control.

errorCallback

Optional. Is called when the operation failed with an error.

Examples

The following example demonstrates ParagraphFormat.getWidowOrphanLines in a practical document-editing workflow. It gets the number of lines for widow/orphan control.

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

TXTextControl.paragraphFormat.getWidowOrphanLines(
    function(result) {
        console.log("get widow orphan lines result:", result);
    },
    onTxError
);