# 0002 โ Let the editor split the quote, manual split only as fallback **Date:** 2026-11-24 ยท **Status:** accepted, to be confirmed by the manual test ## Context The original concept was to split the `
` directly in the DOM. Direct DOM changes bypass the editor: Ctrl+Z then does not work reliably, and nested quotes have to be handled by hand. The Thunderbird mail editor, however, already splits quotes itself when Enter is pressed inside a quote, right up to the outermost quote. ## Decision Default (`splitMode = "native"`): trigger `execCommand("insertParagraph")`, which is the same action as Enter. If the caret is outside every quote afterwards, the comment is inserted with `insertHTML` (HTML messages) or `insertText` (plain-text messages). Both steps end up in the undo history. If the editor does not split the quote, `insertParagraph` is reverted with `undo` and the manual split (`splitCiteAtRange`) is used instead. The manual split can also be selected permanently in the settings ("Advanced" โ "Split the quote" โ "by the add-on"). ## Consequences - Ctrl+Z may need two steps (comment, then split). - Whether `insertParagraph` via `execCommand` splits the quote exactly like the Enter key can only be verified in the real editor. The automatic fallback keeps the add-on working if it does not. - The manual split is not part of the editor's undo history.