mirror of
https://github.com/bulwarkmail/webmail.git
synced 2026-10-31 08:13:50 +00:00
Replying to / forwarding a layout-heavy HTML email (nested tables, MJML, Outlook divs) destroyed its layout: ProseMirror re-parsed the quoted body through its strict schema and discarded anything that didn't fit. The quoted original is now held verbatim in a new atomic QuotedHtml node and never parsed into the schema; its NodeView renders inside a shadow root so app CSS can't cascade in and the in-editor view matches the sent mail 1:1. - quoted-html.ts (new): QuotedHtml atom node + shadow-DOM NodeView (inner contentEditable for redaction), serializeEditorContent(), buildQuotedHtmlBlock(). - rich-text-editor: register the node; emit via serializeEditorContent (not getHTML) so the verbatim island survives. - composer: both HTML reply/forward paths embed the original as an island (sanitize -> cid-rewrite -> buildQuotedHtmlBlock); the signature-swap effect serializes via serializeEditorContent and treats the island as a quote boundary so the splice never cuts into the quoted body. atom:true means Backspace at the boundary / Ctrl+A+Delete removes the whole quote in one go.