# Javascript: TableOfContents.getMaximumStructureLevel Method

> 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.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 29.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > Javascript: TableOfContents.getMaximumStructureLevel Method
- **387 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tableofcontents/getmaximumstructurelevel-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tableofcontents/getmaximumstructurelevel-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tableofcontents/getmaximumstructurelevel-method/llms-full.txt

---

### 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

```javascript
<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.

```javascript
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
    );
}
```

---

## Nearby

- **Previous:** [Javascript: TableOfContents.getLength Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tableofcontents/getlength-method/llms-full.txt)
- **Next:** [Javascript: TableOfContents.getMinimumStructureLevel Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/tableofcontents/getminimumstructurelevel-method/llms-full.txt)
