---
title: "ICreate"
---
# ICreate

Defined in: [src/types/create.d.ts:22](https://github.com/xdan/jodit/blob/main/src/types/create.d.ts#L22)

#### Call Signature

**element**\<`K`\>(`tagName`, `children?`): `HTMLElementTagNameMap`\[`K`\]

Defined in: [src/types/create.d.ts:23](https://github.com/xdan/jodit/blob/main/src/types/create.d.ts#L23)

##### Type Parameters

| Type Parameter |
| ------ |
| `K` *extends* keyof `HTMLElementTagNameMap` |

##### Parameters

| Parameter | Type |
| ------ | ------ |
| `tagName` | `K` |
| `children?` | [`Children`](../modules/types.html#children) |

##### Returns

`HTMLElementTagNameMap`\[`K`\]

#### Call Signature

**element**\<`K`\>(`tagName`, `attributes?`, `children?`): `HTMLElementTagNameMap`\[`K`\]

Defined in: [src/types/create.d.ts:27](https://github.com/xdan/jodit/blob/main/src/types/create.d.ts#L27)

##### Type Parameters

| Type Parameter |
| ------ |
| `K` *extends* keyof `HTMLElementTagNameMap` |

##### Parameters

| Parameter | Type |
| ------ | ------ |
| `tagName` | `K` |
| `attributes?` | [`Attributes`](../modules/types.html#attributes) |
| `children?` | [`Children`](../modules/types.html#children) |

##### Returns

`HTMLElementTagNameMap`\[`K`\]

#### Call Signature

**element**(`tagName`, `childrenOrAttributes?`, `children?`): [`HTMLElement`](https://developer.mozilla.org/docs/Web/API/HTMLElement)

Defined in: [src/types/create.d.ts:32](https://github.com/xdan/jodit/blob/main/src/types/create.d.ts#L32)

##### Parameters

| Parameter | Type |
| ------ | ------ |
| `tagName` | `string` |
| `childrenOrAttributes?` | [`Attributes`](../modules/types.html#attributes) \| [`Children`](../modules/types.html#children) |
| `children?` | [`Children`](../modules/types.html#children) |

##### Returns

[`HTMLElement`](https://developer.mozilla.org/docs/Web/API/HTMLElement)

***

#### Call Signature

**div**(`className?`, `children?`): [`HTMLDivElement`](https://developer.mozilla.org/docs/Web/API/HTMLDivElement)

Defined in: [src/types/create.d.ts:38](https://github.com/xdan/jodit/blob/main/src/types/create.d.ts#L38)

##### Parameters

| Parameter | Type |
| ------ | ------ |
| `className?` | `string` |
| `children?` | [`Children`](../modules/types.html#children) |

##### Returns

[`HTMLDivElement`](https://developer.mozilla.org/docs/Web/API/HTMLDivElement)

#### Call Signature

**div**(`className?`, `attributes?`, `children?`): [`HTMLDivElement`](https://developer.mozilla.org/docs/Web/API/HTMLDivElement)

Defined in: [src/types/create.d.ts:39](https://github.com/xdan/jodit/blob/main/src/types/create.d.ts#L39)

##### Parameters

| Parameter | Type |
| ------ | ------ |
| `className?` | `string` |
| `attributes?` | [`Attributes`](../modules/types.html#attributes) |
| `children?` | [`Children`](../modules/types.html#children) |

##### Returns

[`HTMLDivElement`](https://developer.mozilla.org/docs/Web/API/HTMLDivElement)

#### Call Signature

**div**(`className?`, `childrenOrAttributes?`, `children?`): [`HTMLDivElement`](https://developer.mozilla.org/docs/Web/API/HTMLDivElement)

Defined in: [src/types/create.d.ts:44](https://github.com/xdan/jodit/blob/main/src/types/create.d.ts#L44)

##### Parameters

| Parameter | Type |
| ------ | ------ |
| `className?` | `string` |
| `childrenOrAttributes?` | [`Attributes`](../modules/types.html#attributes) \| [`Children`](../modules/types.html#children) |
| `children?` | [`Children`](../modules/types.html#children) |

##### Returns

[`HTMLDivElement`](https://developer.mozilla.org/docs/Web/API/HTMLDivElement)

***

### sandbox()

**sandbox**(): \[[`HTMLElement`](https://developer.mozilla.org/docs/Web/API/HTMLElement), [`HTMLIFrameElement`](https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement)\]

Defined in: [src/types/create.d.ts:50](https://github.com/xdan/jodit/blob/main/src/types/create.d.ts#L50)

#### Returns

\[[`HTMLElement`](https://developer.mozilla.org/docs/Web/API/HTMLElement), [`HTMLIFrameElement`](https://developer.mozilla.org/docs/Web/API/HTMLIFrameElement)\]

***

#### Call Signature

**span**(`className?`, `children?`): [`HTMLSpanElement`](https://developer.mozilla.org/docs/Web/API/HTMLSpanElement)

Defined in: [src/types/create.d.ts:52](https://github.com/xdan/jodit/blob/main/src/types/create.d.ts#L52)

##### Parameters

| Parameter | Type |
| ------ | ------ |
| `className?` | `string` |
| `children?` | [`Children`](../modules/types.html#children) |

##### Returns

[`HTMLSpanElement`](https://developer.mozilla.org/docs/Web/API/HTMLSpanElement)

#### Call Signature

**span**(`className?`, `attributes?`, `children?`): [`HTMLSpanElement`](https://developer.mozilla.org/docs/Web/API/HTMLSpanElement)

Defined in: [src/types/create.d.ts:53](https://github.com/xdan/jodit/blob/main/src/types/create.d.ts#L53)

##### Parameters

| Parameter | Type |
| ------ | ------ |
| `className?` | `string` |
| `attributes?` | [`Attributes`](../modules/types.html#attributes) |
| `children?` | [`Children`](../modules/types.html#children) |

##### Returns

[`HTMLSpanElement`](https://developer.mozilla.org/docs/Web/API/HTMLSpanElement)

#### Call Signature

**span**(`className?`, `childrenOrAttributes?`, `children?`): [`HTMLSpanElement`](https://developer.mozilla.org/docs/Web/API/HTMLSpanElement)

Defined in: [src/types/create.d.ts:58](https://github.com/xdan/jodit/blob/main/src/types/create.d.ts#L58)

##### Parameters

| Parameter | Type |
| ------ | ------ |
| `className?` | `string` |
| `childrenOrAttributes?` | [`Attributes`](../modules/types.html#attributes) \| [`Children`](../modules/types.html#children) |
| `children?` | [`Children`](../modules/types.html#children) |

##### Returns

[`HTMLSpanElement`](https://developer.mozilla.org/docs/Web/API/HTMLSpanElement)

***

#### Call Signature

**a**(`className?`, `children?`): [`HTMLAnchorElement`](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement)

Defined in: [src/types/create.d.ts:64](https://github.com/xdan/jodit/blob/main/src/types/create.d.ts#L64)

##### Parameters

| Parameter | Type |
| ------ | ------ |
| `className?` | `string` |
| `children?` | [`Children`](../modules/types.html#children) |

##### Returns

[`HTMLAnchorElement`](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement)

#### Call Signature

**a**(`className?`, `attributes?`, `children?`): [`HTMLAnchorElement`](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement)

Defined in: [src/types/create.d.ts:65](https://github.com/xdan/jodit/blob/main/src/types/create.d.ts#L65)

##### Parameters

| Parameter | Type |
| ------ | ------ |
| `className?` | `string` |
| `attributes?` | [`Attributes`](../modules/types.html#attributes) |
| `children?` | [`Children`](../modules/types.html#children) |

##### Returns

[`HTMLAnchorElement`](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement)

#### Call Signature

**a**(`className?`, `childrenOrAttributes?`, `children?`): [`HTMLAnchorElement`](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement)

Defined in: [src/types/create.d.ts:70](https://github.com/xdan/jodit/blob/main/src/types/create.d.ts#L70)

##### Parameters

| Parameter | Type |
| ------ | ------ |
| `className?` | `string` |
| `childrenOrAttributes?` | [`Attributes`](../modules/types.html#attributes) \| [`Children`](../modules/types.html#children) |
| `children?` | [`Children`](../modules/types.html#children) |

##### Returns

[`HTMLAnchorElement`](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement)

***

### text()

**text**(`value`): [`Text`](https://developer.mozilla.org/docs/Web/API/Text)

Defined in: [src/types/create.d.ts:79](https://github.com/xdan/jodit/blob/main/src/types/create.d.ts#L79)

Create text node

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `value` | `string` |

#### Returns

[`Text`](https://developer.mozilla.org/docs/Web/API/Text)

***

### fake()

**fake**(): [`Text`](https://developer.mozilla.org/docs/Web/API/Text)

Defined in: [src/types/create.d.ts:84](https://github.com/xdan/jodit/blob/main/src/types/create.d.ts#L84)

Create invisible text node

#### Returns

[`Text`](https://developer.mozilla.org/docs/Web/API/Text)

***

### fragment()

**fragment**(): [`DocumentFragment`](https://developer.mozilla.org/docs/Web/API/DocumentFragment)

Defined in: [src/types/create.d.ts:89](https://github.com/xdan/jodit/blob/main/src/types/create.d.ts#L89)

Create HTML Document fragment element

#### Returns

[`DocumentFragment`](https://developer.mozilla.org/docs/Web/API/DocumentFragment)

***

### fromHTML()

**fromHTML**\<`T`\>(`html`, `refs?`): `T`

Defined in: [src/types/create.d.ts:94](https://github.com/xdan/jodit/blob/main/src/types/create.d.ts#L94)

Create DOM element from HTML text

#### Type Parameters

| Type Parameter |
| ------ |
| `T` *extends* [`HTMLElement`](https://developer.mozilla.org/docs/Web/API/HTMLElement) |

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `html` | `string` |
| `refs?` | [`IDictionary`](../modules/types.html#idictionary)\<`boolean`\> |

#### Returns

`T`

***

### applyCreateAttributes()

**applyCreateAttributes**(`elm`): `void`

Defined in: [src/types/create.d.ts:102](https://github.com/xdan/jodit/blob/main/src/types/create.d.ts#L102)

Apply to element `createAttributes` options

#### Parameters

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

#### Returns

`void`
