CKEDITOR.plugins.contextMenu
Class replacing the non-configurable native context menu with a configurable CKEditor's equivalent.
Filtering
Methods
-
constructor() → menu
CKEDITOR.plugins.contextMenu#constructor
inherited
Returns
-
add( item )
CKEDITOR.plugins.contextMenu#add
inherited
Adds an item.
Parameters
item : Object
-
addListener( listenerFn )
CKEDITOR.plugins.contextMenu#addListener
inherited
Adds a callback executed on opening the menu. Items returned by that callback are added to the menu.
Parameters
listenerFn : Function
-
Properties
startElement : element
The selection start anchor element.
selection : selection
The current selection.
path : elementPath
The current elements path.
return
Object (
commandName
=>state
) of items that should be added to the menu.
-
addTarget( element, [ nativeContextMenuOnCtrl ] )
CKEDITOR.plugins.contextMenu#addTarget
Starts watching on native context menu triggers (Option key, right click) on the given element.
Parameters
element : element
[ nativeContextMenuOnCtrl ] : Boolean
Whether to open native context menu if the Ctrl key is held on opening the context menu. See CKEDITOR.config.browserContextMenuOnCtrl.
-
findItemByCommandName( commandName ) → Object | null
CKEDITOR.plugins.contextMenu#findItemByCommandName
since 4.9.0 inherited
Finds the menu item corresponding to a given command.
Notice: Keep in mind that the menu is re-rendered on each opening, so caching items (especially DOM elements) may not work. Also executing this method when the menu is not visible may give unexpected results as the items may not be rendered.
Parameters
commandName : String
Returns
-
hide( [ returnFocus ] )
CKEDITOR.plugins.contextMenu#hide
inherited
Hides the menu.
Parameters
[ returnFocus ] : Boolean
-
open( offsetParent, [ corner ], [ offsetX ], [ offsetY ] )
CKEDITOR.plugins.contextMenu#open
Opens the context menu in the given location. See the CKEDITOR.menu.show method.
Parameters
offsetParent : element
[ corner ] : Number
[ offsetX ] : Number
[ offsetY ] : Number
-
removeAll()
CKEDITOR.plugins.contextMenu#removeAll
inherited
Removes all items.
-
show( offsetParent, [ corner ], [ offsetX ], [ offsetY ] )
CKEDITOR.plugins.contextMenu#show
inherited
Shows the menu in given location.
Parameters
offsetParent : element
[ corner ] : Number
[ offsetX ] : Number
[ offsetY ] : Number