feat: add per-message HTML/plain-text toggle #1022

This commit is contained in:
Linus Rath
2026-09-17 22:34:20 +02:00
parent fedfc89d44
commit f6ad8a5942
32 changed files with 648 additions and 80 deletions
+5
View File
@@ -1922,6 +1922,11 @@ export function MailApp({ linkSegments }: MailAppProps = {}) {
bcc: draft.bcc?.map(a => a.email).filter(Boolean).join(', ') || '',
subject: draft.subject || '',
body: htmlBody || bodyText,
// Re-open in the format the draft was written in: a text-only draft
// used to land raw in the rich-text editor (newlines collapsed) and an
// HTML draft raw in the plain-text textarea. Empty draft: the setting
// decides (#1022).
plainTextMode: htmlBody != null ? false : bodyText ? true : undefined,
showCc: (draft.cc?.length || 0) > 0,
showBcc: (draft.bcc?.length || 0) > 0,
selectedIdentityId: matchedIdentityId,