--- title: "Vue 3 Editor Menubar Options" description: "Show all Vue 3 editor menus, choose and order them with EditorMenuName values, or hide the bar, and switch it reactively with a computed :init object." head: - - meta - name: robots content: 'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1' - - meta - name: googlebot content: 'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1' - - meta - name: bingbot content: 'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1' ---
# Customizing the Menubar in Vue 3 `@erag/text-editor-vue` renders an optional desktop-style menubar with File, Edit, View, Insert, Merge tag, Templates, Format, Tools, Table, and Help menus. Set `menubar` in the object bound to `:init` to show every menu, a chosen list in your own order, or none at all. Build that object with `computed` and the bar updates whenever the reactive state behind it changes. --- ## Overview of Menubar Items ```ts import type { EditorInit, EditorMenuName } from '@erag/text-editor-vue'; // 1. Display all default menus const defaultConfig: EditorInit = { menubar: true, }; // 2. Specify custom menu items & order const customConfig: EditorInit = { menubar: [ 'file', 'edit', 'insert', 'merge-tags', 'templates', 'format', 'tools', 'table', ], }; // 3. Hide menubar completely const noMenubarConfig: EditorInit = { menubar: false, }; ``` --- ## All Available Menubar Menus (`EditorMenuName`) | Menu Name | Configuration Keyword | Sub-menu Items and Features | | :------------ | :-------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------- | | **File** | `'file'` | **New document**, **Print**, and **Preview**. | | **Edit** | `'edit'` | **Undo**, **Redo**, **Cut**, **Copy**, **Paste**, **Paste as plain text**, **Select all**, and **Find and replace**. | | **View** | `'view'` | **Source code**, **Preview**, and **Fullscreen**. | | **Insert** | `'insert'` | **Image**, **Link**, **Media**, **Table**, **Checklist**, **Special character**, **Emoji**, **Horizontal line**, **Anchor**, and **Date/time**. | | **Merge tag** | `'merge-tags'` | Triggers the right slide-out panel for grouped merge tags (`client.name`, `proposal.number`, etc.). | | **Templates** | `'templates'` | Opens the searchable template picker modal with live preview. | | **Format** | `'format'` | Inline styles, change case, nested formats, blocks, alignment, line height, and clear formatting. | | **Tools** | `'tools'` | **Source code** and detailed **Word count** statistics. | | **Table** | `'table'` | Insert/properties/delete plus context-sensitive cell, row, and column operations. | | **Help** | `'help'` | Keyboard shortcuts and the About dialog. | The Insert menu items are explained in more detail in [links and anchors](./links-and-anchors.html), [media and embeds](./media-and-embeds.html), [the table editor](./table-editor.html), and [special characters and emoji](./special-characters.html). See [merge tags](./merge-tags.html) and [templates](./templates.html) for the two feature menus. --- ## Detailed Sub-Menu Breakdown ### 1. File Menu (`'file'`) - **New document**: Clears canvas content. - **Preview**: Opens the view-only modal dialog. - **Print**: Triggers browser print dialog for sanitized canvas content. ### 2. Edit Menu (`'edit'`) - **Undo / Redo**: Step back or forward through history. - **Cut / Copy / Paste**: Standard clipboard operations. - **Paste as plain text**: Inserts clipboard text without copied HTML formatting. - **Select all**: Selects all text inside the canvas. - **Find and replace**: Opens the `Ctrl+F` search and replace modal. ### 3. View Menu (`'view'`) - **Source code**: Opens the editable, sanitized HTML source dialog. - **Preview**: Opens a read-only rendering of the current document. - **Fullscreen**: Uses the Fullscreen API with a CSS fallback. ### 4. Insert Menu (`'insert'`) - **Image**: File picker, URL uploader, and aspect ratio resizing. - **Media**: Video, audio, and iframe embed code tab. - **Table**: 10x10 interactive table insertion grid. - **Checklist**: Inserts an interactive checkbox list when the `lists` plugin is enabled. - **Link and Anchor**: Hyperlink dialog and internal page bookmarks. - **Special character**: Categorized symbol picker (Math, Currency, Arrows, etc.). - **Horizontal line**: Section divider (`