# Javascript: Selection.removeInlineStyles Method

> Removes all character based styles of the selected text so that all attributes are reset to the attributes of the paragraph style.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 24.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: Selection.removeInlineStyles Method
- **328 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/selection/removeinlinestyles-method/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/selection/removeinlinestyles-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/selection/removeinlinestyles-method/llms-full.txt

---

### Description

Removes all character based styles of the selected text so that all attributes are reset to the attributes of the paragraph style.

### Syntax

```javascript
<void> Selection.removeInlineStyles([<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `Selection.removeInlineStyles` in a practical document-editing workflow. It removes all character based styles of the selected text so that all attributes are reset to the attributes of the paragraph style.

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

TXTextControl.selection.removeInlineStyles(
    function() {
        console.log("remove inline styles completed.");
    },
    onTxError
);
```

---

## Nearby

- **Previous:** [Javascript: Selection.removeFormatting Method](https://docs.textcontrol.com/ds-server/reference/javascript/selection/removeformatting-method/llms-full.txt)
- **Next:** [Javascript: Selection.save Method](https://docs.textcontrol.com/ds-server/reference/javascript/selection/save-method/llms-full.txt)
