Availability: >= 3.0

Type: Object Property

Description: Sets the buttons to appear on the context menu.


$editor->contextMenu = array $buttons;

The value should be an array of button identifiers for the buttons you would like available on the context menu. Only buttons relevant to the current selection or insertion point will be displayed on the context menu at a given time.

Setting this value will overwrite the default context menu. To add items to the default context menu without completely overwriting the menu you may use the addContextItem method. To remove items from the menu you can use the removeContextItem method.

If the context menu is set to an empty array then the browser's default context menu will be used.

Users can always access the browser's default context menu by holding down the alt key while bringing up the context menu. 

See also:

clearContextMenu, addContextMenuItem, removeContextMenuItem