EmailTemplateEditorController

Email Template Editor Controller

Extends markdown editor functionality with variable insertion support for email templates. Provides buttons to insert available variables into the template.

Usage:

Values:

  • variables: Array of available variables [{name, description}]
  • placeholder: Placeholder text for the editor
  • minHeight: Minimum height of the editor

Constructor

new EmailTemplateEditorController()

Methods

buildToolbar()

Build custom toolbar with variable insertion button

getValue()

Get the editor content

insertVariable()

Insert a variable at the current cursor position

renderPreview()

Render preview with variable highlighting

renderVariableButtons()

Render variable insertion buttons

setValue()

Set the editor content

showVariableMenu()

Show variable insertion menu