---
title: "PluginSystem"
---
# PluginSystem

Defined in: [src/core/plugin/plugin-system.ts:49](https://github.com/xdan/jodit/blob/main/src/core/plugin/plugin-system.ts#L49)

Jodit plugin system

## Example

```js
Jodit.plugins.add('emoji2', {
  init() {
   alert('emoji Inited2')
  },
  destruct() {}
});
```

## Implements

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

### Constructor

**new PluginSystem**(`opts`): `PluginSystem`

Defined in: [src/core/plugin/plugin-system.ts:50](https://github.com/xdan/jodit/blob/main/src/core/plugin/plugin-system.ts#L50)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `opts` | \{ `getContainer`: `HTMLElementTagNameMap`\[`T`\]; \} |
| `opts.getContainer` |

#### Returns

`PluginSystem`

#### Get Signature

**get** **size**(): `number`

Defined in: [src/core/plugin/plugin-system.ts:63](https://github.com/xdan/jodit/blob/main/src/core/plugin/plugin-system.ts#L63)

##### Returns

`number`

#### Implementation of

[`IPluginSystem`](../interfaces/types.IPluginSystem.html).[`size`](../interfaces/types.IPluginSystem.html#size)

### add()

**add**(`name`, `plugin`): `void`

Defined in: [src/core/plugin/plugin-system.ts:70](https://github.com/xdan/jodit/blob/main/src/core/plugin/plugin-system.ts#L70)

Add plugin in store

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `name` | `string` |
| `plugin` | [`PluginType`](../modules/types.html#plugintype) |

#### Returns

`void`

#### Implementation of

[`IPluginSystem`](../interfaces/types.IPluginSystem.html).[`add`](../interfaces/types.IPluginSystem.html#add)

***

### get()

**get**(`name`): `void` \| [`PluginType`](../modules/types.html#plugintype)

Defined in: [src/core/plugin/plugin-system.ts:78](https://github.com/xdan/jodit/blob/main/src/core/plugin/plugin-system.ts#L78)

Get plugin from store

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `name` | `string` |

#### Returns

`void` \| [`PluginType`](../modules/types.html#plugintype)

#### Implementation of

[`IPluginSystem`](../interfaces/types.IPluginSystem.html).[`get`](../interfaces/types.IPluginSystem.html#get)

***

### remove()

**remove**(`name`): `void`

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

Remove plugin from store

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `name` | `string` |

#### Returns

`void`

#### Implementation of

[`IPluginSystem`](../interfaces/types.IPluginSystem.html).[`remove`](../interfaces/types.IPluginSystem.html#remove)

***

### \_\_init()

**\_\_init**(`jodit`): `void`

Defined in: [src/core/plugin/plugin-system.ts:106](https://github.com/xdan/jodit/blob/main/src/core/plugin/plugin-system.ts#L106)

Public method for async init all plugins

#### Parameters

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

#### Returns

`void`

***

### wait()

**wait**(`name`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>

Defined in: [src/core/plugin/plugin-system.ts:187](https://github.com/xdan/jodit/blob/main/src/core/plugin/plugin-system.ts#L187)

Returns the promise to wait for the plugin to load.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `name` | `string` |

#### Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>

#### Implementation of

[`IPluginSystem`](../interfaces/types.IPluginSystem.html).[`wait`](../interfaces/types.IPluginSystem.html#wait)
