@lab2view/vue-email-editor
Vue Email Editor
A professional drag-and-drop email editor built with Vue 3 and MJML.
Design responsive HTML emails visually — 43 blocks, AI generation, merge tags, plugins, i18n, and more.
| Drag & Drop Builder | Ready-made Templates |
|---|---|
![]() |
![]() |
Installation
npm install @lab2view/vue-email-editor vue@^3.4 mjml-browser@^4.15
Quick Start
<script setup lang="ts">
import { ref } from 'vue'
import { EmailEditor } from '@lab2view/vue-email-editor'
import '@lab2view/vue-email-editor/style.css'
const mjml = ref('')
const html = ref('')
const designJson = ref()
</script>
<template>
<EmailEditor
ref="editorRef"
v-model="mjml"
:design-json="designJson"
@update:compiled-html="html = $event"
@update:design-json="designJson = $event"
/>
</template>
The stylesheet is not injected by the JS bundle. Without the
style.cssimport the editor renders unstyled.
That's it. The editor renders a full drag-and-drop email builder with live preview, undo/redo, and HTML export.
Highlights
- 43 blocks — layouts, content, and 30 ready-made composites (hero, pricing, testimonial, FAQ, etc.)
- Inline editing — double-click any text to edit with TipTap (bold, italic, links, colors)
- AI generation — describe an email in plain language, get a production-ready template (BYOAI)
- Merge tags — insert dynamic variables (
{{first_name}}) with visual chips - Conditional content — show/hide sections based on merge tag values
- 22 starter templates — welcome, newsletter, e-commerce, abandoned cart, and more
- ESP export — pre-formatted HTML for Mailchimp, SendGrid, Brevo, AWS SES, Postmark, Resend
- Dark mode preview — simulate email client dark mode in the canvas
- Plugin system — add custom blocks, toolbar actions, sidebar panels
- i18n — English + French included, 175+ label keys for full translation
- Theming — customize colors, fonts, border radius via
themeprop - Undo/Redo — full history with
Ctrl+Z/Ctrl+Shift+Z - Imperative API —
getMjml(),getHtml(),selectNode(),deleteNode(), and more via ref
AI Template Generation
Plug in any LLM — OpenAI, Anthropic, Gemini, or your own backend:
<EmailEditor
v-model="mjml"
:ai-provider="{
generateText: async (prompt, ctx) => { /* your API call */ },
generateTemplate: async (messages, systemPrompt) => { /* your API call */ },
}"
/>
The editor handles JSON parsing, repair, and retry automatically.
Theming & i18n
<EmailEditor
:theme="{ primaryColor: '#7C3AED', borderRadius: '8px' }"
:labels="FR_LABELS"
/>
Documentation
Full API reference, plugin guide, AI integration examples, and more:
License
Related Packages
Vue 3 drag-and-drop email template editor with AI-assisted editing, built on MJM...
Vue 3 MJML email editor with AI generation, drag-and-drop blocks, MJML source ed...
A visual drag & drop email builder for Vue 3. Exports email-client-compatible HT...
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.2.14 | ^3.4.0 | MIT | |
| 0.2.13 | ^3.4.0 | MIT | |
| 0.2.12 | ^3.4.0 | MIT | |
| 0.2.11 | ^3.4.0 | MIT | |
| 0.2.10 | ^3.4.0 | MIT | |
| 0.2.9 | ^3.4.0 | MIT | |
| 0.2.7 | ^3.4.0 | MIT | |
| 0.2.6 | ^3.4.0 | MIT | |
| 0.2.5 | ^3.4.0 | MIT | |
| 0.2.4 | ^3.4.0 | MIT | |
| 0.2.3 | ^3.4.0 | MIT | |
| 0.2.2 | ^3.4.0 | MIT | |
| 0.2.1 | ^3.4.0 | MIT | |
| 0.2.0 | ^3.4.0 | MIT | |
| 0.1.2 | ^3.4.0 | MIT | |
| 0.1.1 | ^3.4.0 | MIT | |
| 0.1.0 | ^3.4.0 | MIT |

