---
title: "CommitStyle"
---
# CommitStyle

Defined in: [src/core/selection/style/commit-style.ts:23](https://github.com/xdan/jodit/blob/main/src/core/selection/style/commit-style.ts#L23)

## Implements

- [`ICommitStyle`](../interfaces/types.ICommitStyle.html)

### Constructor

**new CommitStyle**(`options`): `CommitStyle`

Defined in: [src/core/selection/style/commit-style.ts:83](https://github.com/xdan/jodit/blob/main/src/core/selection/style/commit-style.ts#L83)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `options` | [`IStyleOptions`](../interfaces/types.IStyleOptions.html) |

#### Returns

`CommitStyle`

### options

`readonly` **options**: [`IStyleOptions`](../interfaces/types.IStyleOptions.html)

Defined in: [src/core/selection/style/commit-style.ts:83](https://github.com/xdan/jodit/blob/main/src/core/selection/style/commit-style.ts#L83)

#### Implementation of

[`ICommitStyle`](../interfaces/types.ICommitStyle.html).[`options`](../interfaces/types.ICommitStyle.html#options)

#### Get Signature

**get** **elementIsList**(): `boolean`

Defined in: [src/core/selection/style/commit-style.ts:42](https://github.com/xdan/jodit/blob/main/src/core/selection/style/commit-style.ts#L42)

##### Returns

`boolean`

#### Implementation of

[`ICommitStyle`](../interfaces/types.ICommitStyle.html).[`elementIsList`](../interfaces/types.ICommitStyle.html#elementislist)

***

#### Get Signature

**get** **element**(): [`HTMLTagNames`](../modules/types.html#htmltagnames)

Defined in: [src/core/selection/style/commit-style.ts:48](https://github.com/xdan/jodit/blob/main/src/core/selection/style/commit-style.ts#L48)

##### Returns

[`HTMLTagNames`](../modules/types.html#htmltagnames)

#### Implementation of

[`ICommitStyle`](../interfaces/types.ICommitStyle.html).[`element`](../interfaces/types.ICommitStyle.html#element)

***

#### Get Signature

**get** **elementIsBlock**(): `boolean`

Defined in: [src/core/selection/style/commit-style.ts:55](https://github.com/xdan/jodit/blob/main/src/core/selection/style/commit-style.ts#L55)

New element is a block element

##### Returns

`boolean`

New element is block

#### Implementation of

[`ICommitStyle`](../interfaces/types.ICommitStyle.html).[`elementIsBlock`](../interfaces/types.ICommitStyle.html#elementisblock)

***

#### Get Signature

**get** **isElementCommit**(): `boolean`

Defined in: [src/core/selection/style/commit-style.ts:64](https://github.com/xdan/jodit/blob/main/src/core/selection/style/commit-style.ts#L64)

The commit applies the tag change

##### Returns

`boolean`

The commit applies the tag change

#### Implementation of

[`ICommitStyle`](../interfaces/types.ICommitStyle.html).[`isElementCommit`](../interfaces/types.ICommitStyle.html#iselementcommit)

***

#### Get Signature

**get** **defaultTag**(): [`HTMLTagNames`](../modules/types.html#htmltagnames)

Defined in: [src/core/selection/style/commit-style.ts:71](https://github.com/xdan/jodit/blob/main/src/core/selection/style/commit-style.ts#L71)

##### Returns

[`HTMLTagNames`](../modules/types.html#htmltagnames)

#### Implementation of

[`ICommitStyle`](../interfaces/types.ICommitStyle.html).[`defaultTag`](../interfaces/types.ICommitStyle.html#defaulttag)

***

#### Get Signature

**get** **elementIsDefault**(): `boolean`

Defined in: [src/core/selection/style/commit-style.ts:79](https://github.com/xdan/jodit/blob/main/src/core/selection/style/commit-style.ts#L79)

##### Returns

`boolean`

#### Implementation of

[`ICommitStyle`](../interfaces/types.ICommitStyle.html).[`elementIsDefault`](../interfaces/types.ICommitStyle.html#elementisdefault)

### isApplied()

**isApplied**(`elm`, `key`): `boolean`

Defined in: [src/core/selection/style/commit-style.ts:27](https://github.com/xdan/jodit/blob/main/src/core/selection/style/commit-style.ts#L27)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `elm` | [`HTMLElement`](https://developer.mozilla.org/docs/Web/API/HTMLElement) |
| `key` | `string` |

#### Returns

`boolean`

#### Implementation of

[`ICommitStyle`](../interfaces/types.ICommitStyle.html).[`isApplied`](../interfaces/types.ICommitStyle.html#isapplied)

***

### setApplied()

**setApplied**(`elm`, `key`): `void`

Defined in: [src/core/selection/style/commit-style.ts:36](https://github.com/xdan/jodit/blob/main/src/core/selection/style/commit-style.ts#L36)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `elm` | [`HTMLElement`](https://developer.mozilla.org/docs/Web/API/HTMLElement) |
| `key` | `string` |

#### Returns

`void`

#### Implementation of

[`ICommitStyle`](../interfaces/types.ICommitStyle.html).[`setApplied`](../interfaces/types.ICommitStyle.html#setapplied)

***

### apply()

**apply**(`jodit`): `void`

Defined in: [src/core/selection/style/commit-style.ts:85](https://github.com/xdan/jodit/blob/main/src/core/selection/style/commit-style.ts#L85)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `jodit` | [`IJodit`](../interfaces/types.IJodit.html) |

#### Returns

`void`

#### Implementation of

[`ICommitStyle`](../interfaces/types.ICommitStyle.html).[`apply`](../interfaces/types.ICommitStyle.html#apply)
