# Javascript: FormattingStyle.getBaseStyle Method

> Gets the FormattingStyle which is the base style of this style.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 28.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: FormattingStyle.getBaseStyle Method
- **315 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/formattingstyle/getbasestyle-method/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/formattingstyle/getbasestyle-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/formattingstyle/getbasestyle-method/llms-full.txt

---

### Description

Gets the FormattingStyle which is the base style of this style.

### Syntax

```javascript
<void> FormattingStyle.getBaseStyle(<RequestFormattingStyleCallback> callback)
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Receives the FormattingStyle which is the base style of this style. |

### Examples

The following example demonstrates `FormattingStyle.getBaseStyle` in a practical document-editing workflow. It gets the FormattingStyle which is the base style of this style.

```javascript
function inspectBaseStyle(formattingStyle) {
    formattingStyle.getBaseStyle(
        function(style) {
            if (!style) {
                console.warn("No formatting style was returned.");
                return;
            }
            
            console.log("get base style result:", style);
        }
    );
}
```

---

## Nearby

- **Previous:** [Javascript: FormattingStyle.getBaseline Method](https://docs.textcontrol.com/ds-server/reference/javascript/formattingstyle/getbaseline-method/llms-full.txt)
- **Next:** [Javascript: FormattingStyle.getBold Method](https://docs.textcontrol.com/ds-server/reference/javascript/formattingstyle/getbold-method/llms-full.txt)
