# Javascript: ParagraphStyle.getFollowingStyle Method

> Gets the name of the style that the document automatically uses for the following paragraph after the user has pressed the ENTER key.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 28.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > Javascript: ParagraphStyle.getFollowingStyle Method
- **379 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/paragraphstyle/getfollowingstyle-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/paragraphstyle/getfollowingstyle-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/paragraphstyle/getfollowingstyle-method/llms-full.txt

---

### Description

Gets the name of the style that the document automatically uses for the following paragraph after the user has pressed the ENTER key.

### Syntax

```javascript
<void> ParagraphStyle.getFollowingStyle(<RequestStringCallback> callback, [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Receives the name of the style that TextControl automatically selects for the following paragraph after the user has pressed the ENTER key. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `ParagraphStyle.getFollowingStyle` in a practical document-editing workflow. It gets the name of the style that the document automatically uses for the following paragraph after the user has pressed the ENTER key.

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

function inspectFollowingStyle(paragraphStyle) {
    paragraphStyle.getFollowingStyle(
        function(result) {
            console.log("get following style result:", result);
        },
        onTxError
    );
}
```

---

## Nearby

- **Previous:** [ParagraphStyle Object](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/paragraphstyle/llms-full.txt)
- **Next:** [Javascript: ParagraphStyle.getParagraphFormat Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/paragraphstyle/getparagraphformat-method/llms-full.txt)
