Skip to main content

Menus

These options control the menubar at the top of the editor and the context menu that appears on right-click.

Options

OptionTypeDefaultDescription
menubarboolean/stringtrue (phones: false)Enable or configure the menubar. true shows the default menus, false hides it, or pass a space-separated string of menu names to show specific menus.
menuobject{}Custom menu structure. Each key is a menu name and the value is an object with title and items properties.
removed_menuitemsstring''Space-separated list of menu item names to remove from all menus.
contextmenustring/string[]/false'link linkchecker image editimage table spellchecker configurepermanentpen'Context menu sections shown on right-click. Pass false to use the browser's native context menu.
contextmenu_avoid_overlapstring''CSS selector for elements that the context menu should not overlap. The menu repositions itself to avoid covering matched elements.
contextmenu_never_use_nativebooleanfalseAlways show the Editor42 context menu, even when the editor would normally fall back to the browser's native menu.

Example

editor42.init({
selector: 'textarea',
menubar: 'file edit view insert format table',
menu: {
custom: {
title: 'My Menu',
items: 'bold italic | removeformat'
}
},
removed_menuitems: 'newdocument print',
contextmenu: 'link image table'
});