# Javascript: ParagraphFormat.setTabPositions Method

> Sets an array containing the absolute tab stop positions, in twips, in a paragraph.

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

---

### Description

Sets an array containing the absolute tab stop positions, in twips, in a paragraph.

### Syntax

```javascript
<void> ParagraphFormat.setTabPositions(<number[]> value, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| value | The absolute tab stop positions, in twips, in a paragraph. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `ParagraphFormat.setTabPositions` in a practical document-editing workflow. It sets an array containing the absolute tab stop positions, in twips, in a paragraph.

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

TXTextControl.paragraphFormat.setTabPositions(
    [],
    function() {
        console.log("set tab positions completed.");
    },
    onTxError
);
```

---

## Nearby

- **Previous:** [Javascript: ParagraphFormat.setTabLeaders Method](https://docs.textcontrol.com/ds-server/reference/javascript/paragraphformat/settableaders-method/llms-full.txt)
- **Next:** [Javascript: ParagraphFormat.setTabTypes Method](https://docs.textcontrol.com/ds-server/reference/javascript/paragraphformat/settabtypes-method/llms-full.txt)
