Problem
The email template creation UI (/templates/new?type=email) currently uses a rigid
"add block" pattern — clicking Heading, Text, or Button appends a separate
fixed card to the page. This makes editing feel clunky:
- No way to reorder blocks (drag & drop)
- No inline rich text formatting (bold, links, lists, etc.) inside the Text block
- Each block is a disconnected UI card rather than a continuous, WYSIWYG document
- Doesn't visually resemble the actual email that will be sent, despite the live
preview panel on the right
Proposed Solution
Replace the current block-based builder with a TipTap-based rich text editor, since
TipTap is already used in the project for job description writing. Reusing it here would let us:
- Edit the whole email body as one continuous rich-text document
- Support inline formatting (bold/italic/links/lists) natively
- Insert "Button" and variable chips (
{{candidate_name}}, {{job_title}}, etc.) as
custom TipTap nodes/marks instead of separate fixed cards
- Get block reordering via drag-and-drop more naturally (TipTap supports node dragging
with the right extensions)
- Keep the live preview panel in sync more easily by rendering TipTap's JSON/HTML output
directly into the preview iframe
Scope / Things to Figure Out
- Whether "Button" and "Heading" become custom TipTap node types or stay as
separate inline elements
- How
{{variable}} chips are represented in the TipTap schema (custom mention-style node
is probably cleanest, so they can't be broken by accidental text edits)
Problem
The email template creation UI (
/templates/new?type=email) currently uses a rigid"add block" pattern — clicking Heading, Text, or Button appends a separate
fixed card to the page. This makes editing feel clunky:
preview panel on the right
Proposed Solution
Replace the current block-based builder with a TipTap-based rich text editor, since
TipTap is already used in the project for job description writing. Reusing it here would let us:
{{candidate_name}},{{job_title}}, etc.) ascustom TipTap nodes/marks instead of separate fixed cards
with the right extensions)
directly into the preview iframe
Scope / Things to Figure Out
separate inline elements
{{variable}}chips are represented in the TipTap schema (custom mention-style nodeis probably cleanest, so they can't be broken by accidental text edits)