# Javascript: InlineStyle.resetToParagraph Method

> Resets one or more of the style's attributes to its default value which is the same value as defined for the surrounding paragraph.

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

---

### Description

Resets one or more of the style's attributes to its default value which is the same value as defined for the surrounding paragraph.

### Syntax

```javascript
<void> InlineStyle.resetToParagraph(<InlineStyle.Attributes> attributes, [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| attributes | Specifies one or more attributes. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `InlineStyle.resetToParagraph` in a practical document-editing workflow. Resets one or more of the style's attributes to its default value which is the same value as defined for the surrounding paragraph.

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

function resetToParagraph(inlineStyle, attributes) {
    inlineStyle.resetToParagraph(attributes, onTxError);
}
```

---

## Nearby

- **Previous:** [Javascript: InlineStyle.isInheritedFromParagraph Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/inlinestyle/isinheritedfromparagraph-method/llms-full.txt)
- **Next:** [InlineStyleCollection Object](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/inlinestylecollection/llms-full.txt)
