# Menus

> Editor42 menu options — show, hide or choose the menus of the menubar, define menus of your own, remove menu items, and set up the right-click context menu.

Source: https://editor42.com/api/configuration/menu  
Section: Configuration Options > Menus  
Every page of editor42.com has a Markdown copy at its URL + `.md` (`index.md` after a URL that ends in `/`); all of them are in one file: https://editor42.com/llms-full.txt

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

## Options

| Option | Type | Default | Description |
|---|---|---|---|
| `menubar` | boolean/string | `true` (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. |
| `menu` | object | `{}` | Custom menu structure. Each key is a menu name and the value is an object with `title` and `items` properties. |
| `removed_menuitems` | string | `''` | Space-separated list of menu item names to remove from all menus. |
| `contextmenu` | string/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_overlap` | string | `''` | CSS selector for elements that the context menu should not overlap. The menu repositions itself to avoid covering matched elements. |
| `contextmenu_never_use_native` | boolean | `false` | Always show the Editor42 context menu, even when the editor would normally fall back to the browser's native menu. |

## Example

```js
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'
});
```
