fix(composer): keep signature images by switching to rich text - #13388
Open
kesselb wants to merge 2 commits into
Open
fix(composer): keep signature images by switching to rich text#13388kesselb wants to merge 2 commits into
kesselb wants to merge 2 commits into
Conversation
GeneralHtmlSupport was loaded in both editor modes, so plain text mode kept <img> elements that toPlain() then dropped without notice on submit. Load it only in html mode and switch the editor mode when a signature contains an image. Assisted-by: ClaudeCode:claude-opus-5 Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
kesselb
force-pushed
the
fix-html-signature-vs-plain-text
branch
from
July 31, 2026 17:08
d0a9903 to
7aeb53f
Compare
Plain text accounts get the plain text editor, so images can't enter a signature in the first place. Signatures that already contain one keep the rich text editor and warn that the composer overrides the mode. Assisted-by: ClaudeCode:claude-opus-5 Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
kesselb
force-pushed
the
fix-html-signature-vs-plain-text
branch
from
July 31, 2026 17:13
7aeb53f to
042814c
Compare
kesselb
marked this pull request as ready for review
July 31, 2026 17:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GeneralHtmlSupport was loaded in both editor modes, so plain text mode kept
elements that toPlain() then dropped without notice on submit. Load it only in html mode and switch the editor mode when a signature contains an image.
We documented the weird ux about signature (with html elements) and using plain text at #10617, but never improved the current state.
Adding the GeneralHtmlSupport plugin made it worse, because before the image (was unsupported) and removed by ckeditor (=> not visible in the editor). With GeneralHtmlSupport it's supported and the image is not removed. However the actual sending process will still drop it.
That PR's brings back the old behavior, by loading html only for rich text, with the small addition that we'd automatically switch to rich text. Also the signature editor is now using the editor mode from the account and shows a warning if you signature enforces html.
Steps to reproduce
🤖 AI (if applicable)