# Javascript: InlineStyle.isInheritedFromParagraph Method

> Informs about whether one or more of the style's attributes are inherited from the surrounding paragraph.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 28.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: InlineStyle.isInheritedFromParagraph Method
- **462 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/inlinestyle/isinheritedfromparagraph-method/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/inlinestyle/isinheritedfromparagraph-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/inlinestyle/isinheritedfromparagraph-method/llms-full.txt

---

### Description

Informs about whether one or more of the style's attributes are inherited from the surrounding paragraph.

### Syntax

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

### Parameters

| Parameter | Description |
|---|---|
| attributes | Specifies one or more attributes. |
| callback | Receives true, if the specified attributes are inherited from the paragraph. Otherwise it is false. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `InlineStyle.isInheritedFromParagraph` in a practical document-editing workflow. Informs about whether one or more of the style's attributes are inherited from the surrounding paragraph.

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

function isInheritedFromParagraph(inlineStyle, attributes) {
    inlineStyle.isInheritedFromParagraph(
        attributes,
        function(result) {
            if (result) {
                console.log("is inherited from paragraph is available.");
            } else {
                console.warn("is inherited from paragraph is not available in the current document state.");
            }
        },
        onTxError
    );
}
```

---

## Nearby

- **Previous:** [Javascript: InlineStyle.Attributes Enumeration](https://docs.textcontrol.com/ds-server/reference/javascript/inlinestyle/attributes-enumeration/llms-full.txt)
- **Next:** [Javascript: InlineStyle.resetToParagraph Method](https://docs.textcontrol.com/ds-server/reference/javascript/inlinestyle/resettoparagraph-method/llms-full.txt)
