# RequestParagraphFormatCallback Function

> Callback function for requesting a paragraph's format.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Function
- **Path:** DS Server > Reference > JavaScript API > RequestParagraphFormatCallback Function
- **276 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/requestparagraphformatcallback/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/requestparagraphformatcallback/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/requestparagraphformatcallback/llms-full.txt

---

### Description

Callback function for requesting a [paragraph's format](https://docs.textcontrol.com/ds-server/reference/javascript/paragraphformat/llms-full.txt).

### Syntax

```javascript
function(<ParagraphFormat> format)
```

### Examples

The following example demonstrates `RequestParagraphFormatCallback` in a practical document-editing workflow. Callback function for requesting a paragraph's format.

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

function requestParagraphFormatCallback(format) {
    console.log("format:", format);
}

function useRequestParagraphFormatCallback(paragraphStyle) {
    paragraphStyle.getParagraphFormat(requestParagraphFormatCallback, onTxError);
}
```

---

## Nearby

- **Previous:** [RequestParagraphCallback Function](https://docs.textcontrol.com/ds-server/reference/javascript/requestparagraphcallback/llms-full.txt)
- **Next:** [RequestParagraphStyleCallback Function](https://docs.textcontrol.com/ds-server/reference/javascript/requestparagraphstylecallback/llms-full.txt)
