Skip to content

Props

Component Props

PropTypeDefaultDescription
modelValuestring''MJML content (v-model)
designJsonRecord<string, unknown>Persisted design JSON for loading saved designs
variablesstring[][]Available merge variables displayed in the sidebar
labelsPartial<EditorLabels>DEFAULT_LABELSi18n label overrides
labelstringForm field label (when used in a form)
requiredbooleanfalseForm validation required flag
themePartial<ThemeConfig>DEFAULT_THEMEVisual customization
pluginsPlugin[][]Editor extensions
aiProviderAiProviderAI integration (template generation, text tools)
mergeTagsMergeTag[][]Personalization variables for AI and merge tag insertion
imageUploadImageUploadHandlerCustom image upload handler
browseAssetsBrowseAssetsHandlerCustom asset browser handler

modelValue / v-model

The MJML source string. Updated whenever the document changes.

vue
<EmailEditor v-model="mjml" />

designJson

Pass a saved design to load it. The editor detects the format:

  • New format ({ _editor: 'mesagoo-email-editor', ... }) — loaded directly
  • Legacy GrapesJS format — parsed via MJML fallback
vue
<EmailEditor :design-json="savedDesign" />

variables

List of merge variable names displayed in a sidebar panel:

vue
<EmailEditor :variables="['first_name', 'last_name', 'company']" />

labels

Partial label overrides. Missing keys fall back to English defaults. See i18n guide.

vue
<EmailEditor :labels="{ editor_title: 'My Editor' }" />

theme

Partial theme overrides. See Theming guide for all 25 properties.

vue
<EmailEditor :theme="{ primaryColor: '#7C3AED' }" />

plugins

Array of plugin functions. See Plugins guide.

vue
<EmailEditor :plugins="[myPlugin, anotherPlugin]" />

aiProvider

An object implementing the AiProvider interface. Enables AI-powered features: template generation via chat, text improvement, and subject line suggestions. See AI Generation guide.

vue
<EmailEditor :ai-provider="myAiProvider" />

mergeTags

Array of MergeTag objects representing personalization variables. Displayed in the sidebar for insertion and included in the AI system prompt.

vue
<EmailEditor :merge-tags="[
  { name: 'First Name', value: '{{first_name}}', category: 'Contact' },
  { name: 'Company', value: '{{company}}', category: 'Company' },
]" />

Emitted Events (Vue)

EventPayloadDescription
update:modelValuestringMJML source updated
update:compiled-htmlstringCompiled HTML updated
update:design-jsonEmailDesignJsonDesign JSON updated

Released under the MIT License.