Rich Text and Email Editors =========================== This page documents which editor implementation is used in each area of eventyay, how they are integrated, and how to reuse the shared Tiptap layer in new forms. Overview -------- eventyay uses three editor implementations: .. list-table:: :header-rows: 1 :widths: 30 25 45 * - Area - Editor - Notes * - Talk submission forms (abstract, description, notes) - Toast UI Editor (Markdown) - Stays as-is. Fields use ``MarkdownWidget`` / ``I18nMarkdownTextarea``. * - Video rich text and chat - Quill 2 (Vue component) - Stays as-is. Implemented in ``webapp/video/``. * - Ticket forms / general rich text - **Tiptap** (``RichTextField``) - New. Use for new plain-HTML rich text fields. * - Ticket Message center (compose / outbox / team mail) - **Tiptap** (``I18nEmailBodyFormField``) - Primary integration. Gmail-like editor with placeholder insertion. * - Order personal email (order detail → Send email) - **Tiptap** (``EmailBodyField``) - Secondary. Same email profile for one-off messages. Tiptap Editor Layer ------------------- The shared Tiptap implementation lives in two places: * **Frontend bundle**: ``app/eventyay/webapp/editor/`` * **Django layer**: ``app/eventyay/common/`` Frontend Bundle (``webapp/editor/``) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ A Vite-built IIFE bundle with no external framework dependency. The built ``editor.js`` and ``editor.css`` are committed under ``eventyay/static/editor/`` (same pattern as Toast UI in ``static/vendored/``) so production ``collectstatic`` picks them up without an extra Docker npm build. **Key files:** .. code-block:: text webapp/editor/ # Source (edit here) src/ index.js # Entry point; auto-mounts on [data-tiptap-profile] profiles/ richtext.js # Simple rich text (Bold, Italic, Underline, Lists, Link) email.js # Email profile (extends richtext + placeholder chips) extensions/ placeholder-variable.js # Custom non-editable inline node for {var} chips toolbar.js # Toolbar DOM builder styles.css # Editor and toolbar styles eventyay/static/editor/ # Deployed bundle (commit after rebuilding) editor.js editor.css **Editor profiles:** ``richtext`` For general-purpose rich text fields. Toolbar: Bold, Italic, Underline, Bullet list, Numbered list, Link, Clear formatting, Undo, Redo. ``email`` Extends ``richtext`` with an "Insert placeholder" dropdown (populated from ``data-tiptap-placeholders`` JSON on the textarea) and a Preview button (calls ``data-tiptap-preview-url``). **Progressive enhancement:** The bundle mounts on any ``