Skip to content

ckeditor5-elements / ContextMenuObserver

Class: ContextMenuObserver ​

Fires the contextmenu event on the view document when the user opens the native context menu in an editable.

Extends ​

Constructors ​

Constructor ​

ts
new ContextMenuObserver(view): ContextMenuObserver;

Creates an instance of the observer.

Parameters ​

ParameterType
viewEditingView

Returns ​

ContextMenuObserver

Inherited from ​

DomEventObserver<'contextmenu'>.constructor

Accessors ​

domEventType ​

Get Signature ​

ts
get domEventType(): "contextmenu";

Type of the DOM event the observer should listen to. Array of types can be defined if the observer should listen to multiple DOM events.

Returns ​

"contextmenu"

Overrides ​

DomEventObserver.domEventType

Methods ​

onDomEvent() ​

ts
onDomEvent(domEvent): void;

Fires contextmenu on the view document for the DOM event.

Parameters ​

ParameterType
domEventMouseEvent

Returns ​

void

Overrides ​

DomEventObserver.onDomEvent