# Javascript: ListFormat.setNumberFormat Method

> Sets the number format for a numbered list.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 28.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: ListFormat.setNumberFormat Method
- **329 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/listformat/setnumberformat-method/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/listformat/setnumberformat-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/listformat/setnumberformat-method/llms-full.txt

---

### Description

Sets the number format for a numbered list.

### Syntax

```javascript
<void> ListFormat.setNumberFormat(<NumberFormat> value, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| value | The number format for a numbered list. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `ListFormat.setNumberFormat` in a practical document-editing workflow. It sets the number format for a numbered list.

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

TXTextControl.listFormat.setNumberFormat(
    TXTextControl.NumberFormat.ArabicNumbers,
    function() {
        console.log("set number format completed.");
    },
    onTxError
);
```

---

## Nearby

- **Previous:** [Javascript: ListFormat.setLevel Method](https://docs.textcontrol.com/ds-server/reference/javascript/listformat/setlevel-method/llms-full.txt)
- **Next:** [Javascript: ListFormat.setRestartNumbering Method](https://docs.textcontrol.com/ds-server/reference/javascript/listformat/setrestartnumbering-method/llms-full.txt)
