--- title: "Vue 3 Editor Dividers and Date/Time" description: "Add horizontal rule dividers and date or time values to Vue 3 editor content, and choose the Insert menu formats with dateFormats and timeFormats in init." 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' --- # Insert dividers and dates in the Vue 3 editor In the Vue 3 editor, the `horizontal-rule` plugin puts an `
` divider at the caret and the `date-time` plugin inserts the current date or time from the Insert menu. Both are switched on through the `init` object you bind with `:init`. --- ## Configuration Include `horizontal-rule` and `date-time` plugins: ```ts const editorConfig: EditorInit = { plugins: ['horizontal-rule', 'date-time'], menubar: ['insert'], toolbar: 'undo redo | blocks | bold italic | hr removeformat', }; ``` --- ## Horizontal Rules (`hr`) Clicking the **Horizontal Rule** (`hr`) button inserts a thematic section break line (`
` element) at the cursor position. ```html


``` The trailing paragraph gives the caret a valid place to continue typing after the divider. --- ## Date and Time Stamps (`date-time`) Open **Insert → Date/time** and choose a configured value. Date and time values are generated when the menu opens, so they do not become stale. `date-time` is a plugin name, not a toolbar keyword. ```ts const editorConfig: EditorInit = { dateFormats: [ { label: 'Long date', type: 'date', options: { year: 'numeric', month: 'long', day: 'numeric' }, }, ], timeFormats: [ { label: '24-hour time', type: 'time', options: { hour: '2-digit', minute: '2-digit', hour12: false }, }, ], }; ``` The same options in a single-file component: ```vue ``` The [configuration reference](./configuration.html#formatting-choices) lists the defaults for both format lists.