# Javascript: ParagraphFormat.getTabTypes Method

> Gets the tab types in a paragraph.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 26.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: ParagraphFormat.getTabTypes Method
- **397 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/paragraphformat/gettabtypes-method/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/paragraphformat/gettabtypes-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/paragraphformat/gettabtypes-method/llms-full.txt

---

### Description

Gets the tab types in a paragraph.

### Syntax

```javascript
<void> ParagraphFormat.getTabTypes(<RequestTabTypesCallback> callback, [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Receives the tab types in a paragraph. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `ParagraphFormat.getTabTypes` in a practical document-editing workflow. It gets the tab types in a paragraph.

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

TXTextControl.paragraphFormat.getTabTypes(
    function(section) {
        if (!section) {
            console.warn("No section was returned.");
            return;
        }
        
        console.log("get tab types result:", section);
    },
    onTxError
);
```

### Remarks

The default type is TabType.LeftTab. The property returns an array with common values when the text selection contains multiple paragraphs with mixed types. The remaining not common values are set to zero. If all values are different, the Selection.IsCommonValueSelected method returns false.

---

## Nearby

- **Previous:** [Javascript: ParagraphFormat.getTabPositions Method](https://docs.textcontrol.com/ds-server/reference/javascript/paragraphformat/gettabpositions-method/llms-full.txt)
- **Next:** [Javascript: ParagraphFormat.getTopDistance Method](https://docs.textcontrol.com/ds-server/reference/javascript/paragraphformat/gettopdistance-method/llms-full.txt)
