CKEDITOR.plugins.contextMenu
Class replacing the non-configurable native context menu with a configurable CKEditor's equivalent.
Filtering
Methods
-
-
-
Adds a callback executed on opening the menu. Items returned by that callback are added to the menu.
Parameters
listenerFn : Function
addTarget( element, [ nativeContextMenuOnCtrl ] )CKEDITOR.plugins.contextMenu#addTargetStarts watching on native context menu triggers (Option key, right click) on the given element.
Parameters
element : element[ nativeContextMenuOnCtrl ] : BooleanWhether to open native context menu if the Ctrl key is held on opening the context menu. See CKEDITOR.config.browserContextMenuOnCtrl.
since 4.9.0 inherited
findItemByCommandName( commandName ) → Object | nullCKEDITOR.plugins.contextMenu#findItemByCommandNameFinds 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
Object | nullreturn An object containing a given item. If the item was not found,
nullis returned.Propertiesitem : menuItemThe item definition.
element : elementThe rendered element representing the item in the menu.
-
open( offsetParent, [ corner ], [ offsetX ], [ offsetY ] )CKEDITOR.plugins.contextMenu#openOpens the context menu in the given location. See the CKEDITOR.menu.show method.
Parameters
offsetParent : element[ corner ] : Number[ offsetX ] : Number[ offsetY ] : Number
-
Removes all items.
inherited
show( offsetParent, [ corner ], [ offsetX ], [ offsetY ] )CKEDITOR.plugins.contextMenu#showShows the menu in given location.
Parameters
offsetParent : element[ corner ] : Number[ offsetX ] : Number[ offsetY ] : Number