---
title: "ContextMenu"
---
# ContextMenu

Defined in: [src/modules/context-menu/context-menu.ts:25](https://github.com/xdan/jodit/blob/main/src/modules/context-menu/context-menu.ts#L25)

Module to generate context menu

## Extends

- [`Popup`](./ui_popup.Popup.html)

## Implements

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

### Constructor

**new ContextMenu**(`jodit`, `smart?`): `ContextMenu`

Defined in: [src/core/ui/popup/popup.ts:472](https://github.com/xdan/jodit/blob/main/src/core/ui/popup/popup.ts#L472)

#### Parameters

| Parameter | Type | Default value |
| ------ | ------ | ------ |
| `jodit` | [`IViewBased`](../interfaces/types.IViewBased.html) | `undefined` |
| `smart` | `boolean` | `true` |

#### Returns

`ContextMenu`

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`constructor`](./ui_popup.Popup.html#constructor)

### STATUSES

`static` **STATUSES**: `object`

Defined in: [src/core/component/component.ts:40](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L40)

#### beforeInit

`readonly` **beforeInit**: `"beforeInit"` = `'beforeInit'`

#### ready

`readonly` **ready**: `"ready"` = `'ready'`

#### beforeDestruct

`readonly` **beforeDestruct**: `"beforeDestruct"` = `'beforeDestruct'`

#### destructed

`readonly` **destructed**: `"destructed"` = `'destructed'`

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`STATUSES`](./ui_popup.Popup.html#statuses)

***

### async

**async**: [`IAsync`](../interfaces/types.IAsync.html)

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

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`async`](../interfaces/types.IContextMenu.html#async)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`async`](./ui_popup.Popup.html#async)

***

### uid

`readonly` **uid**: `string`

Defined in: [src/core/component/component.ts:59](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L59)

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`uid`](../interfaces/types.IContextMenu.html#uid)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`uid`](./ui_popup.Popup.html#uid)

***

### ownerWindow

**ownerWindow**: [`Window`](https://developer.mozilla.org/docs/Web/API/Window) = `window`

Defined in: [src/core/component/component.ts:109](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L109)

The window in which jodit was created

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`ownerWindow`](../interfaces/types.IContextMenu.html#ownerwindow)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`ownerWindow`](./ui_popup.Popup.html#ownerwindow)

***

### jodit

**jodit**: [`IViewBased`](../interfaces/types.IViewBased.html)

Defined in: [src/core/component/view-component.ts:22](https://github.com/xdan/jodit/blob/main/src/core/component/view-component.ts#L22)

Parent View element

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`jodit`](../interfaces/types.IContextMenu.html#jodit)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`jodit`](./ui_popup.Popup.html#jodit)

***

### container

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

Defined in: [src/core/ui/element.ts:34](https://github.com/xdan/jodit/blob/main/src/core/ui/element.ts#L34)

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`container`](../interfaces/types.IContextMenu.html#container)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`container`](./ui_popup.Popup.html#container)

***

### name

**name**: `string` = `''`

Defined in: [src/core/ui/element.ts:35](https://github.com/xdan/jodit/blob/main/src/core/ui/element.ts#L35)

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`name`](../interfaces/types.IContextMenu.html#name)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`name`](./ui_popup.Popup.html#name)

***

### mods

`readonly` **mods**: [`IDictionary`](../modules/types.html#idictionary)\<`string` \| `boolean` \| `null`\> = `{}`

Defined in: [src/core/ui/element.ts:133](https://github.com/xdan/jodit/blob/main/src/core/ui/element.ts#L133)

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`mods`](../interfaces/types.IContextMenu.html#mods)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`mods`](./ui_popup.Popup.html#mods)

***

### syncMod

**syncMod**: `boolean` = `false`

Defined in: [src/core/ui/group/group.ts:45](https://github.com/xdan/jodit/blob/main/src/core/ui/group/group.ts#L45)

Synchronize mods to all children

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`syncMod`](./ui_popup.Popup.html#syncmod)

***

### elements

**elements**: [`IUIElement`](../interfaces/types.IUIElement.html)[] = `[]`

Defined in: [src/core/ui/group/group.ts:47](https://github.com/xdan/jodit/blob/main/src/core/ui/group/group.ts#L47)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`elements`](./ui_popup.Popup.html#elements)

***

### buttonSize

**buttonSize**: `"small"` \| `"tiny"` \| `"xsmall"` \| `"middle"` \| `"large"` = `'middle'`

Defined in: [src/core/ui/group/group.ts:74](https://github.com/xdan/jodit/blob/main/src/core/ui/group/group.ts#L74)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`buttonSize`](./ui_popup.Popup.html#buttonsize)

***

### options?

`readonly` `optional` **options?**: [`IDictionary`](../modules/types.html#idictionary)

Defined in: [src/core/ui/group/group.ts:197](https://github.com/xdan/jodit/blob/main/src/core/ui/group/group.ts#L197)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`options`](./ui_popup.Popup.html#options)

***

### isOpened

**isOpened**: `boolean` = `false`

Defined in: [src/core/ui/popup/popup.ts:59](https://github.com/xdan/jodit/blob/main/src/core/ui/popup/popup.ts#L59)

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`isOpened`](../interfaces/types.IContextMenu.html#isopened)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`isOpened`](./ui_popup.Popup.html#isopened)

***

### strategy

**strategy**: [`PopupStrategy`](../modules/types.html#popupstrategy) = `'leftBottom'`

Defined in: [src/core/ui/popup/popup.ts:60](https://github.com/xdan/jodit/blob/main/src/core/ui/popup/popup.ts#L60)

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`strategy`](../interfaces/types.IContextMenu.html#strategy)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`strategy`](./ui_popup.Popup.html#strategy)

***

### viewBound

**viewBound**: () => [`IBound`](../interfaces/types.IBound.html)

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

#### Returns

[`IBound`](../interfaces/types.IBound.html)

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`viewBound`](../interfaces/types.IContextMenu.html#viewbound)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`viewBound`](./ui_popup.Popup.html#viewbound)

***

### smart

`readonly` **smart**: `boolean` = `true`

Defined in: [src/core/ui/popup/popup.ts:474](https://github.com/xdan/jodit/blob/main/src/core/ui/popup/popup.ts#L474)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`smart`](./ui_popup.Popup.html#smart)

#### Get Signature

**get** **componentName**(): `string`

Defined in: [src/core/component/component.ts:46](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L46)

##### Returns

`string`

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`componentName`](../interfaces/types.IContextMenu.html#componentname)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`componentName`](./ui_popup.Popup.html#componentname)

***

#### Get Signature

**get** **ownerDocument**(): [`Document`](https://developer.mozilla.org/docs/Web/API/Document)

Defined in: [src/core/component/component.ts:95](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L95)

The document in which jodit was created

##### Returns

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

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`ownerDocument`](../interfaces/types.IContextMenu.html#ownerdocument)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`ownerDocument`](./ui_popup.Popup.html#ownerdocument)

***

#### Get Signature

**get** **od**(): [`Document`](https://developer.mozilla.org/docs/Web/API/Document)

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

Shortcut for `this.ownerDocument`

##### Returns

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

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`od`](../interfaces/types.IContextMenu.html#od)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`od`](./ui_popup.Popup.html#od)

***

#### Get Signature

**get** **ow**(): [`Window`](https://developer.mozilla.org/docs/Web/API/Window)

Defined in: [src/core/component/component.ts:110](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L110)

##### Returns

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

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`ow`](../interfaces/types.IContextMenu.html#ow)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`ow`](./ui_popup.Popup.html#ow)

***

#### Get Signature

**get** **isReady**(): `boolean`

Defined in: [src/core/component/component.ts:145](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L145)

Component is ready for work

##### Returns

`boolean`

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`isReady`](../interfaces/types.IContextMenu.html#isready)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`isReady`](./ui_popup.Popup.html#isready)

***

#### Get Signature

**get** **isDestructed**(): `boolean`

Defined in: [src/core/component/component.ts:152](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L152)

Component was destructed

##### Returns

`boolean`

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`isDestructed`](../interfaces/types.IContextMenu.html#isdestructed)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`isDestructed`](./ui_popup.Popup.html#isdestructed)

***

#### Get Signature

**get** **isInDestruct**(): `boolean`

Defined in: [src/core/component/component.ts:160](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L160)

The component is currently undergoing destructuring or has already been destroyed.
Those. you should not the app froze new events on him now or do anything else with him.

##### Returns

`boolean`

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`isInDestruct`](../interfaces/types.IContextMenu.html#isindestruct)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`isInDestruct`](./ui_popup.Popup.html#isindestruct)

***

#### Get Signature

**get** **componentStatus**(): [`ComponentStatus`](../modules/types.html#componentstatus)

Defined in: [src/core/component/component.ts:210](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L210)

Current component status

##### Returns

[`ComponentStatus`](../modules/types.html#componentstatus)

#### Set Signature

**set** **componentStatus**(`componentStatus`): `void`

Defined in: [src/core/component/component.ts:217](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L217)

Setter for current component status

##### Parameters

| Parameter | Type |
| ------ | ------ |
| `componentStatus` | [`ComponentStatus`](../modules/types.html#componentstatus) |

##### Returns

`void`

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`componentStatus`](../interfaces/types.IContextMenu.html#componentstatus)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`componentStatus`](./ui_popup.Popup.html#componentstatus)

***

#### Get Signature

**get** **j**(): `T`

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

Shortcut for `this.jodit`

##### Returns

`T`

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`j`](../interfaces/types.IContextMenu.html#j)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`j`](./ui_popup.Popup.html#j)

***

#### Get Signature

**get** **defaultTimeout**(): `number`

Defined in: [src/core/component/view-component.ts:31](https://github.com/xdan/jodit/blob/main/src/core/component/view-component.ts#L31)

##### Returns

`number`

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`defaultTimeout`](../interfaces/types.IContextMenu.html#defaulttimeout)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`defaultTimeout`](./ui_popup.Popup.html#defaulttimeout)

***

#### Get Signature

**get** **parentElement**(): [`Nullable`](../modules/types.html#nullable)\<[`IUIElement`](../interfaces/types.IUIElement.html)\>

Defined in: [src/core/ui/element.ts:45](https://github.com/xdan/jodit/blob/main/src/core/ui/element.ts#L45)

##### Returns

[`Nullable`](../modules/types.html#nullable)\<[`IUIElement`](../interfaces/types.IUIElement.html)\>

#### Set Signature

**set** **parentElement**(`parentElement`): `void`

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

##### Parameters

| Parameter | Type |
| ------ | ------ |
| `parentElement` | [`Nullable`](../modules/types.html#nullable)\<[`IUIElement`](../interfaces/types.IUIElement.html)\> |

##### Returns

`void`

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`parentElement`](../interfaces/types.IContextMenu.html#parentelement)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`parentElement`](./ui_popup.Popup.html#parentelement)

***

#### Get Signature

**get** **allChildren**(): [`IUIElement`](../interfaces/types.IUIElement.html)[]

Defined in: [src/core/ui/group/group.ts:52](https://github.com/xdan/jodit/blob/main/src/core/ui/group/group.ts#L52)

All group children

##### Returns

[`IUIElement`](../interfaces/types.IUIElement.html)[]

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`allChildren`](./ui_popup.Popup.html#allchildren)

#### Call Signature

**getFullElName**(`elementName`): `string`

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

Calc BEM element class name

##### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `elementName` | `string` | element name in the bem classification |

##### Returns

`string`

##### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`getFullElName`](../interfaces/types.IContextMenu.html#getfullelname)

##### Inherited from

[`Popup`](./ui_popup.Popup.html).[`getFullElName`](./ui_popup.Popup.html#getfullelname)

#### Call Signature

**getFullElName**(`elementName`, `mod`): `string`

Defined in: [src/core/component/component.ts:66](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L66)

Calc BEM element class name

##### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `elementName` | `string` | element name in the bem classification |
| `mod` | `string` | - |

##### Returns

`string`

##### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`getFullElName`](../interfaces/types.IContextMenu.html#getfullelname)

##### Inherited from

[`Popup`](./ui_popup.Popup.html).[`getFullElName`](./ui_popup.Popup.html#getfullelname)

#### Call Signature

**getFullElName**(`elementName`, `mod`, `modValue`): `string`

Defined in: [src/core/component/component.ts:67](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L67)

Calc BEM element class name

##### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `elementName` | `string` | element name in the bem classification |
| `mod` | `string` | - |
| `modValue` | `string` \| `boolean` | - |

##### Returns

`string`

##### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`getFullElName`](../interfaces/types.IContextMenu.html#getfullelname)

##### Inherited from

[`Popup`](./ui_popup.Popup.html).[`getFullElName`](./ui_popup.Popup.html#getfullelname)

***

### bindDestruct()

**bindDestruct**(`component`): `this`

Defined in: [src/core/component/component.ts:170](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L170)

Bind destructor to some View

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `component` | [`IComponent`](../interfaces/types.IComponent.html) |

#### Returns

`this`

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`bindDestruct`](../interfaces/types.IContextMenu.html#binddestruct)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`bindDestruct`](./ui_popup.Popup.html#binddestruct)

***

### setStatus()

**setStatus**(`componentStatus`): `void`

Defined in: [src/core/component/component.ts:226](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L226)

Set component status

#### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `componentStatus` | [`ComponentStatus`](../modules/types.html#componentstatus) | component status |

#### Returns

`void`

#### See

ComponentStatus

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`setStatus`](../interfaces/types.IContextMenu.html#setstatus)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`setStatus`](./ui_popup.Popup.html#setstatus)

***

### hookStatus()

**hookStatus**(`status`, `callback`): `void`

Defined in: [src/core/component/component.ts:265](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L265)

Adds a handler for changing the component's status

#### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `status` | [`ComponentStatus`](../modules/types.html#componentstatus) | the status at which the callback is triggered |
| `callback` | (`component`) => `void` | a function that will be called when the status is `status` |

#### Returns

`void`

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`hookStatus`](../interfaces/types.IContextMenu.html#hookstatus)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`hookStatus`](./ui_popup.Popup.html#hookstatus)

***

### isInstanceOf()

`static` **isInstanceOf**\<`T`\>(`c`, `constructorFunc`): `c is T`

Defined in: [src/core/component/component.ts:283](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L283)

#### Type Parameters

| Type Parameter |
| ------ |
| `T` *extends* [`Component`](./component.Component.html) |

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `c` | `unknown` |
| `constructorFunc` | [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function) |

#### Returns

`c is T`

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`isInstanceOf`](./ui_popup.Popup.html#isinstanceof)

***

### i18n()

**i18n**(`text`, ...`params`): `string`

Defined in: [src/core/component/view-component.ts:35](https://github.com/xdan/jodit/blob/main/src/core/component/view-component.ts#L35)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `text` | `string` |
| ...`params` | (`string` \| `number`)[] |

#### Returns

`string`

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`i18n`](../interfaces/types.IContextMenu.html#i18n)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`i18n`](./ui_popup.Popup.html#i18n)

***

### getElm()

**getElm**\<`T`\>(`this`, `elementName`): [`Nullable`](../modules/types.html#nullable)\<[`HTMLElement`](https://developer.mozilla.org/docs/Web/API/HTMLElement)\>

Defined in: [src/core/traits/elms.ts:18](https://github.com/xdan/jodit/blob/main/src/core/traits/elms.ts#L18)

Return element with BEM class name

#### Type Parameters

| Type Parameter |
| ------ |
| `T` *extends* [`IComponent`](../interfaces/types.IComponent.html)\<[`IViewBased`](../interfaces/types.IViewBased.html)\<[`IViewOptions`](../interfaces/types.IViewOptions.html)\>\> & [`IContainer`](../interfaces/types.IContainer.html) & [`IElms`](../interfaces/types.IElms.html) |

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `this` | `T` |
| `elementName` | `string` |

#### Returns

[`Nullable`](../modules/types.html#nullable)\<[`HTMLElement`](https://developer.mozilla.org/docs/Web/API/HTMLElement)\>

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`getElm`](../interfaces/types.IContextMenu.html#getelm)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`getElm`](./ui_popup.Popup.html#getelm)

***

### getElms()

**getElms**\<`T`\>(`this`, `elementName`): [`HTMLElement`](https://developer.mozilla.org/docs/Web/API/HTMLElement)[]

Defined in: [src/core/traits/elms.ts:30](https://github.com/xdan/jodit/blob/main/src/core/traits/elms.ts#L30)

Return elements with BEM class name

#### Type Parameters

| Type Parameter |
| ------ |
| `T` *extends* [`IComponent`](../interfaces/types.IComponent.html)\<[`IViewBased`](../interfaces/types.IViewBased.html)\<[`IViewOptions`](../interfaces/types.IViewOptions.html)\>\> & [`IContainer`](../interfaces/types.IContainer.html) & [`IElms`](../interfaces/types.IElms.html) |

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `this` | `T` |
| `elementName` | `string` |

#### Returns

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

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`getElms`](../interfaces/types.IContextMenu.html#getelms)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`getElms`](./ui_popup.Popup.html#getelms)

***

### setMod()

**setMod**\<`T`\>(`this`, `name`, `value`, `container?`): `T`

Defined in: [src/core/traits/mods.ts:30](https://github.com/xdan/jodit/blob/main/src/core/traits/mods.ts#L30)

Set/remove BEM class modification

#### Type Parameters

| Type Parameter |
| ------ |
| `T` *extends* [`IComponent`](../interfaces/types.IComponent.html)\<[`IViewBased`](../interfaces/types.IViewBased.html)\<[`IViewOptions`](../interfaces/types.IViewOptions.html)\>\> & [`IContainer`](../interfaces/types.IContainer.html) & [`IMods`](../interfaces/types.IMods.html) |

#### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `this` | `T` | - |
| `name` | `string` | - |
| `value` | [`ModType`](../modules/types.html#modtype) | if null, mod will be removed |
| `container?` | [`HTMLElement`](https://developer.mozilla.org/docs/Web/API/HTMLElement) | - |

#### Returns

`T`

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`setMod`](../interfaces/types.IContextMenu.html#setmod)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`setMod`](./ui_popup.Popup.html#setmod)

***

### getMod()

**getMod**(`this`, `name`): [`ModType`](../modules/types.html#modtype)

Defined in: [src/core/traits/mods.ts:64](https://github.com/xdan/jodit/blob/main/src/core/traits/mods.ts#L64)

Get BEM class modification value

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `this` | [`IMods`](../interfaces/types.IMods.html) |
| `name` | `string` |

#### Returns

[`ModType`](../modules/types.html#modtype)

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`getMod`](../interfaces/types.IContextMenu.html#getmod)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`getMod`](./ui_popup.Popup.html#getmod)

***

### bubble()

**bubble**(`callback`): `this`

Defined in: [src/core/ui/element.ts:59](https://github.com/xdan/jodit/blob/main/src/core/ui/element.ts#L59)

Apply callback for all parents

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `callback` | (`parent`) => `void` |

#### Returns

`this`

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`bubble`](../interfaces/types.IContextMenu.html#bubble)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`bubble`](./ui_popup.Popup.html#bubble)

***

### get()

**get**\<`T`\>(`chain`, `obj?`): [`Nullable`](../modules/types.html#nullable)\<`T`\>

Defined in: [src/core/ui/element.ts:76](https://github.com/xdan/jodit/blob/main/src/core/ui/element.ts#L76)

#### Type Parameters

| Type Parameter |
| ------ |
| `T` |

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `chain` | `string` |
| `obj?` | [`IDictionary`](../modules/types.html#idictionary) |

#### Returns

[`Nullable`](../modules/types.html#nullable)\<`T`\>

#### Implementation of

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

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`get`](./ui_popup.Popup.html#get)

***

### closest()

Find match parent

#### Call Signature

**closest**\<`T`\>(`ctor`): [`Nullable`](../modules/types.html#nullable)\<`T`\>

Defined in: [src/core/ui/element.ts:80](https://github.com/xdan/jodit/blob/main/src/core/ui/element.ts#L80)

##### Type Parameters

| Type Parameter |
| ------ |
| `T` |

##### Parameters

| Parameter | Type |
| ------ | ------ |
| `ctor` | [`ComponentCompatible`](../interfaces/decorators_component.ComponentCompatible.html)\<`T`\> |

##### Returns

[`Nullable`](../modules/types.html#nullable)\<`T`\>

##### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`closest`](../interfaces/types.IContextMenu.html#closest)

##### Inherited from

[`Popup`](./ui_popup.Popup.html).[`closest`](./ui_popup.Popup.html#closest)

#### Call Signature

**closest**\<`T`\>(`type`): [`Nullable`](../modules/types.html#nullable)\<`T` *extends* *typeof* [`UIElement`](./ui.UIElement.html) ? [`InstanceType`](https://www.typescriptlang.org/docs/handbook/utility-types.html#instancetypetype)\<`T`\> : `T`\>

Defined in: [src/core/ui/element.ts:82](https://github.com/xdan/jodit/blob/main/src/core/ui/element.ts#L82)

##### Type Parameters

| Type Parameter |
| ------ |
| `T` *extends* *typeof* [`UIElement`](./ui.UIElement.html) \| [`UIElement`](./ui.UIElement.html)\<[`IViewBased`](../interfaces/types.IViewBased.html)\<[`IViewOptions`](../interfaces/types.IViewOptions.html)\>\> |

##### Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function) \| [`UIElement`](./ui.UIElement.html)\<[`IViewBased`](../interfaces/types.IViewBased.html)\<[`IViewOptions`](../interfaces/types.IViewOptions.html)\>\> |

##### Returns

[`Nullable`](../modules/types.html#nullable)\<`T` *extends* *typeof* [`UIElement`](./ui.UIElement.html) ? [`InstanceType`](https://www.typescriptlang.org/docs/handbook/utility-types.html#instancetypetype)\<`T`\> : `T`\>

##### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`closest`](../interfaces/types.IContextMenu.html#closest)

##### Inherited from

[`Popup`](./ui_popup.Popup.html).[`closest`](./ui_popup.Popup.html#closest)

***

### closestElement()

`static` **closestElement**(`node`, `type`): [`Nullable`](../modules/types.html#nullable)\<[`IUIElement`](../interfaces/types.IUIElement.html)\>

Defined in: [src/core/ui/element.ts:120](https://github.com/xdan/jodit/blob/main/src/core/ui/element.ts#L120)

Find closest UIElement in DOM

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `node` | [`Node`](https://developer.mozilla.org/docs/Web/API/Node) |
| `type` | [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function) |

#### Returns

[`Nullable`](../modules/types.html#nullable)\<[`IUIElement`](../interfaces/types.IUIElement.html)\>

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`closestElement`](./ui_popup.Popup.html#closestelement)

***

### appendTo()

**appendTo**(`element`): `this`

Defined in: [src/core/ui/element.ts:145](https://github.com/xdan/jodit/blob/main/src/core/ui/element.ts#L145)

Append container to element

#### Parameters

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

#### Returns

`this`

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`appendTo`](../interfaces/types.IContextMenu.html#appendto)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`appendTo`](./ui_popup.Popup.html#appendto)

***

### getRole()

**getRole**(): `string`

Defined in: [src/core/ui/group/group.ts:38](https://github.com/xdan/jodit/blob/main/src/core/ui/group/group.ts#L38)

#### Returns

`string`

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`getRole`](../interfaces/types.IContextMenu.html#getrole)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`getRole`](./ui_popup.Popup.html#getrole)

***

### update()

**update**(): `void`

Defined in: [src/core/ui/group/group.ts:80](https://github.com/xdan/jodit/blob/main/src/core/ui/group/group.ts#L80)

Update all children

#### Returns

`void`

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`update`](../interfaces/types.IContextMenu.html#update)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`update`](./ui_popup.Popup.html#update)

***

#### Call Signature

**append**(`elm`, `index?`): `this`

Defined in: [src/core/ui/group/group.ts:88](https://github.com/xdan/jodit/blob/main/src/core/ui/group/group.ts#L88)

Append new element into group

##### Parameters

| Parameter | Type |
| ------ | ------ |
| `elm` | [`IUIElement`](../interfaces/types.IUIElement.html) |
| `index?` | `number` |

##### Returns

`this`

##### Inherited from

[`Popup`](./ui_popup.Popup.html).[`append`](./ui_popup.Popup.html#append)

#### Call Signature

**append**(`elm`, `distElement?`): `this`

Defined in: [src/core/ui/group/group.ts:89](https://github.com/xdan/jodit/blob/main/src/core/ui/group/group.ts#L89)

Append new element into group

##### Parameters

| Parameter | Type |
| ------ | ------ |
| `elm` | [`IUIElement`](../interfaces/types.IUIElement.html) |
| `distElement?` | `string` |

##### Returns

`this`

##### Inherited from

[`Popup`](./ui_popup.Popup.html).[`append`](./ui_popup.Popup.html#append)

#### Call Signature

**append**(`elm`, `distElement?`): `this`

Defined in: [src/core/ui/group/group.ts:90](https://github.com/xdan/jodit/blob/main/src/core/ui/group/group.ts#L90)

Append new element into group

##### Parameters

| Parameter | Type |
| ------ | ------ |
| `elm` | [`IUIElement`](../interfaces/types.IUIElement.html)[] |
| `distElement?` | `string` |

##### Returns

`this`

##### Inherited from

[`Popup`](./ui_popup.Popup.html).[`append`](./ui_popup.Popup.html#append)

***

### afterSetMod()

**afterSetMod**(`name`, `value`): `void`

Defined in: [src/core/ui/group/group.ts:138](https://github.com/xdan/jodit/blob/main/src/core/ui/group/group.ts#L138)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `name` | `string` |
| `value` | [`ModType`](../modules/types.html#modtype) |

#### Returns

`void`

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`afterSetMod`](../interfaces/types.IContextMenu.html#aftersetmod)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`afterSetMod`](./ui_popup.Popup.html#aftersetmod)

***

### remove()

**remove**(`elm`): `this`

Defined in: [src/core/ui/group/group.ts:169](https://github.com/xdan/jodit/blob/main/src/core/ui/group/group.ts#L169)

Remove element from group

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `elm` | [`IUIElement`](../interfaces/types.IUIElement.html) |

#### Returns

`this`

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`remove`](./ui_popup.Popup.html#remove)

***

### clear()

**clear**(): `this`

Defined in: [src/core/ui/group/group.ts:184](https://github.com/xdan/jodit/blob/main/src/core/ui/group/group.ts#L184)

Clear group

#### Returns

`this`

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`clear`](./ui_popup.Popup.html#clear)

***

### setParentView()

**setParentView**(`view`): `this`

Defined in: [src/core/ui/group/group.ts:207](https://github.com/xdan/jodit/blob/main/src/core/ui/group/group.ts#L207)

Attach component to View

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `view` | [`IViewBased`](../interfaces/types.IViewBased.html) |

#### Returns

`this`

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`setParentView`](../interfaces/types.IContextMenu.html#setparentview)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`setParentView`](./ui_popup.Popup.html#setparentview)

***

### updateParentElement()

**updateParentElement**(`target`): `this`

Defined in: [src/core/ui/popup/popup.ts:81](https://github.com/xdan/jodit/blob/main/src/core/ui/popup/popup.ts#L81)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `target` | [`IUIElement`](../interfaces/types.IUIElement.html) |

#### Returns

`this`

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`updateParentElement`](../interfaces/types.IContextMenu.html#updateparentelement)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`updateParentElement`](./ui_popup.Popup.html#updateparentelement)

***

### setContent()

**setContent**(`content`): `this`

Defined in: [src/core/ui/popup/popup.ts:104](https://github.com/xdan/jodit/blob/main/src/core/ui/popup/popup.ts#L104)

Set popup content

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `content` | `string` \| [`HTMLElement`](https://developer.mozilla.org/docs/Web/API/HTMLElement) \| [`IUIElement`](../interfaces/types.IUIElement.html) |

#### Returns

`this`

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`setContent`](../interfaces/types.IContextMenu.html#setcontent)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`setContent`](./ui_popup.Popup.html#setcontent)

***

### open()

**open**(`getBound`, `keepPosition?`, `parentContainer?`): `this`

Defined in: [src/core/ui/popup/popup.ts:127](https://github.com/xdan/jodit/blob/main/src/core/ui/popup/popup.ts#L127)

Open popup near with some bound

#### Parameters

| Parameter | Type | Default value |
| ------ | ------ | ------ |
| `getBound` | `getBoundFunc` | `undefined` |
| `keepPosition` | `boolean` | `false` |
| `parentContainer?` | [`HTMLElement`](https://developer.mozilla.org/docs/Web/API/HTMLElement) | `undefined` |

#### Returns

`this`

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`open`](../interfaces/types.IContextMenu.html#open)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`open`](./ui_popup.Popup.html#open)

***

### updatePosition()

**updatePosition**(): `this`

Defined in: [src/core/ui/popup/popup.ts:251](https://github.com/xdan/jodit/blob/main/src/core/ui/popup/popup.ts#L251)

Update container position

#### Returns

`this`

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`updatePosition`](../interfaces/types.IContextMenu.html#updateposition)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`updatePosition`](./ui_popup.Popup.html#updateposition)

***

### close()

**close**(): `this`

Defined in: [src/core/ui/popup/popup.ts:373](https://github.com/xdan/jodit/blob/main/src/core/ui/popup/popup.ts#L373)

Close popup

#### Returns

`this`

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`close`](../interfaces/types.IContextMenu.html#close)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`close`](./ui_popup.Popup.html#close)

***

### isOwnClick()

**isOwnClick**(`e`): `boolean`

Defined in: [src/core/ui/popup/popup.ts:403](https://github.com/xdan/jodit/blob/main/src/core/ui/popup/popup.ts#L403)

#### Parameters

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

#### Returns

`boolean`

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`isOwnClick`](../interfaces/types.IContextMenu.html#isownclick)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`isOwnClick`](./ui_popup.Popup.html#isownclick)

***

### setZIndex()

**setZIndex**(`index`): `void`

Defined in: [src/core/ui/popup/popup.ts:468](https://github.com/xdan/jodit/blob/main/src/core/ui/popup/popup.ts#L468)

Set ZIndex

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `index` | `string` \| `number` |

#### Returns

`void`

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`setZIndex`](../interfaces/types.IContextMenu.html#setzindex)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`setZIndex`](./ui_popup.Popup.html#setzindex)

***

### render()

**render**(): `string`

Defined in: [src/core/ui/popup/popup.ts:480](https://github.com/xdan/jodit/blob/main/src/core/ui/popup/popup.ts#L480)

Method create only box

#### Returns

`string`

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`render`](./ui_popup.Popup.html#render)

***

### destruct()

**destruct**(): `any`

Defined in: [src/core/ui/popup/popup.ts:487](https://github.com/xdan/jodit/blob/main/src/core/ui/popup/popup.ts#L487)

*

#### Returns

`any`

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`destruct`](../interfaces/types.IContextMenu.html#destruct)

#### Inherited from

[`Popup`](./ui_popup.Popup.html).[`destruct`](./ui_popup.Popup.html#destruct)

***

### className()

**className**(): `string`

Defined in: [src/modules/context-menu/context-menu.ts:27](https://github.com/xdan/jodit/blob/main/src/modules/context-menu/context-menu.ts#L27)

#### Returns

`string`

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`className`](../interfaces/types.IContextMenu.html#classname)

#### Overrides

[`Popup`](./ui_popup.Popup.html).[`className`](./ui_popup.Popup.html#classname)

***

### show()

**show**(`x`, `y`, `actions`): `void`

Defined in: [src/modules/context-menu/context-menu.ts:42](https://github.com/xdan/jodit/blob/main/src/modules/context-menu/context-menu.ts#L42)

Generate and show context menu

#### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `x` | `number` | Global coordinate by X |
| `y` | `number` | Global coordinate by Y |
| `actions` | (`false` \| [`IContextMenuAction`](../interfaces/types.IContextMenuAction.html))[] | Array with plain objects `{icon: 'bin', title: 'Delete', exec: function () {}}` |

#### Returns

`void`

#### Example

```javascript
parent.show(e.clientX, e.clientY, [{icon: 'bin', title: 'Delete', exec: function () { alert(1) }}]);
```

#### Implementation of

[`IContextMenu`](../interfaces/types.IContextMenu.html).[`show`](../interfaces/types.IContextMenu.html#show)
