TX Text Control .NET Server

Javascript: TableOfContents.getMinimumStructureLevel Method

Method|Introduced in 29.0

Description

Gets the minimum structure level for this table of contents. The table of contents contains all paragraphs with a structure level less than or equal this value. It must be between 1 and 10.

Syntax

<void> TableOfContents.getMinimumStructureLevel(<RequestNumberCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Receives the property value.

errorCallback

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

Examples

The following example demonstrates TableOfContents.getMinimumStructureLevel in a practical document-editing workflow. It gets the minimum structure level for this table of contents. The table of contents contains all paragraphs with a structure level less than or equal this value. It must be between 1 and 10.

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

function inspectMinimumStructureLevel(tableOfContents) {
    tableOfContents.getMinimumStructureLevel(
        function(result) {
            console.log("get minimum structure level result:", result);
        },
        onTxError
    );
}