Javascript: TableOfContents.getMaximumStructureLevel Method
Description
Gets the maximum 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.getMaximumStructureLevel(<RequestNumberCallback> callback, [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| callback | Receives the property value. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates TableOfContents.getMaximumStructureLevel in a practical document-editing workflow. It gets the maximum 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 inspectMaximumStructureLevel(tableOfContents) {
tableOfContents.getMaximumStructureLevel(
function(result) {
console.log("get maximum structure level result:", result);
},
onTxError
);
}