EmailTemplateEditorController

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()

Source:

Methods

buildToolbar()

Description:
  • Build custom toolbar with variable insertion button

Source:

getValue()

Description:
  • Get the editor content

Source:

insertVariable()

Description:
  • Insert a variable at the current cursor position

Source:

renderPreview()

Description:
  • Render preview with variable highlighting

Source:

renderVariableButtons()

Description:
  • Render variable insertion buttons

Source:

setValue()

Description:
  • Set the editor content

Source:

(async) showVariableMenu()

Description:
  • Show variable insertion menu

Source: