# Javascript: ListFormat.getFormatCharacter Method

> Gets the formatting character for a bulleted or numbered list.

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

---

### Description

Gets the formatting character for a bulleted or numbered list.

### Syntax

```javascript
<void> ListFormat.getFormatCharacter(<RequestListFormatCharacterCallback> callback, [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Receives the formatting character for a bulleted or numbered list. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `ListFormat.getFormatCharacter` in a practical document-editing workflow. It gets the formatting character for a bulleted or numbered list.

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

TXTextControl.listFormat.getFormatCharacter(
    function(result) {
        if (!result) {
            console.warn("No list format character was returned.");
            return;
        }
        
        console.log("get format character result:", result);
    },
    onTxError
);
```

---

## Nearby

- **Previous:** [Javascript: ListFormat.getFontName Method](https://docs.textcontrol.com/ds-server/reference/javascript/listformat/getfontname-method/llms-full.txt)
- **Next:** [Javascript: ListFormat.getHangingIndent Method](https://docs.textcontrol.com/ds-server/reference/javascript/listformat/gethangingindent-method/llms-full.txt)
