/**
 * Editor help text — embedded copy of `app/docs/editor.md`.
 *
 * Source of truth is the .md file (it's what ships in `app/docs/` for any
 * external reader). This TS const is the runtime copy the compose iframe
 * loads — embedding here avoids an asset fetch from the WebView (which
 * has different paths on desktop/Android and would fail silently when the
 * docs aren't bundled).
 *
 * Keep this in sync with `app/docs/editor.md`. When updating either, copy
 * the .md contents into the EDITOR_HELP_MD literal below. (A small sync
 * script under `app/docs/` could automate this — TODO once the rules /
 * docs sync pattern stabilizes.)
 */
export const EDITOR_HELP_MD = `# Compose editor — formatting and shortcuts

mailx ships with two rich-text editors: **Quill** (default) and **tiptap**.
Most things work the same in both. Differences are called out below.

Switch editors via **Settings → Editor → Quill | tiptap**.

## Universal — works in both editors

| Action | Shortcut | Where |
|---|---|---|
| **Send** | Ctrl+Enter | toolbar Send button |
| Bold / Italic / Underline | Ctrl+B / Ctrl+I / Ctrl+U | toolbar B / I / U |
| Strikethrough | Ctrl+Shift+X | toolbar S |
| Bulleted list | Ctrl+Shift+8 | toolbar • |
| Ordered list | Ctrl+Shift+7 | toolbar 1. |
| Insert / edit link | Ctrl+K | toolbar 🔗 |
| Remove link | Ctrl+Shift+K | (no toolbar button — use Ctrl+Shift+K) |
| Blockquote | (Quill: Ctrl+Shift+Q; tiptap: toolbar) | toolbar \" |
| Clear formatting | Ctrl+\\\\ | toolbar ✖ |
| Heading (H1 / H2 / H3) | (Quill: format dropdown; tiptap: select dropdown) | "Normal / Heading 1 / 2 / 3" |
| Undo / Redo | Ctrl+Z / Ctrl+Y | (no toolbar button) |
| Spell-check | (browser native — red underlines) | right-click word |
| Paste plain text | Ctrl+Shift+V | (browser native) |
| Paste markdown as formatting | (automatic) | Pasted plain text that looks like markdown (headings, \`- \` lists, \`> \` quotes, \\*\\*bold\\*\\*, code fences, pipe tables) converts to real formatting — blockquotes, lists, tables — instead of flat text. Ordinary prose is never touched; rich (HTML) clipboards keep their own markup. |

## Quill-only

| Action | Shortcut |
|---|---|
| Indent / outdent | Ctrl+] / Ctrl+[ |
| Color text | Ctrl+Shift+C |
| Format dropdown | toolbar (left side) |
| Inline code | toolbar \`<>\` |
| Code block | toolbar |
| Image inserter | (no built-in; use drag-and-drop or paste) |

Quill has a more elaborate toolbar with format-specific dropdowns (font, size,
color). Internally Quill uses its own *Delta* document model — copy/paste
from Word/Outlook sometimes leaves extra empty paragraphs that you'll see
in the sent message body.

## tiptap-only

| Action | Where |
|---|---|
| Heading select | left of toolbar |
| Toggle bold / italic / underline / strike | toolbar B / I / U / S |
| Blockquote | toolbar \" |
| Image (drag-and-drop) | drop a file into the body |

tiptap is built on ProseMirror. Output HTML is cleaner than Quill on
Word/Outlook paste roundtrips. Bundle is smaller. Some Quill toolbar
features (inline code, indent shortcuts, color picker) aren't wired —
use the heading select / format menu instead.

## Common features (across both)

- **Drag-and-drop attachments** — drop files anywhere on the compose
  window to attach. Overlay highlights the drop target while dragging.
- **Edit in Word / LibreOffice** — toolbar **Edit in Word** button opens
  the body in your default external editor. Save in the external editor
  and the body reloads here. mailx writes a temporary \`.docx\` file (see
  \`~/.rmfmail/external-edit/\`) and watches it for changes.
- **Auto-save drafts** — every 5 seconds (and on input debounce / on
  blur). Drafts land in the Drafts folder via IMAP append.
- **Address auto-completion** — type a partial name in To/Cc/Bcc; matches
  rank by recency × use-count. Group names from \`contacts.jsonc → groups\`
  also surface here.
- **Address-field expansion** — recipient fields are auto-growing
  textareas; long lists wrap to multiple lines.
- **Group expansion on send** — type a group name (e.g. \`family\`) in
  To/Cc/Bcc and it expands to the address list at send time.
- **Ghost-text autocomplete** (off by default) — Settings →
  AI autocomplete → on. Predicts the next words while you type.

## When the toolbar doesn't appear

The editor loads from a CDN (jsdelivr). If your network can't reach it, the
toolbar disappears and a plain \`contenteditable\` fallback takes over. Status
bar shows the failure. mailx tries the *other* editor before falling all the
way back; if both fail you get a plain textarea with no shortcuts and no
toolbar — sending still works.

## See also

- \`accounts.md\`, \`contacts.md\`, \`allowlist.md\`, \`clients.md\`, \`config.md\`,
  \`preferences.md\` — config-file references (these live in your GDrive
  \`.rmfmail/\` folder).
- This document is **app-internal** — it ships with each release and
  documents the editor as it currently exists in the version you're
  running. It is not deployed to your user folder.
`;
//# sourceMappingURL=editor-help.js.map