Skip to content

fix(composer): keep signature images by switching to rich text - #13388

Open
kesselb wants to merge 2 commits into
mainfrom
fix-html-signature-vs-plain-text
Open

fix(composer): keep signature images by switching to rich text#13388
kesselb wants to merge 2 commits into
mainfrom
fix-html-signature-vs-plain-text

Conversation

@kesselb

@kesselb kesselb commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

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.

image

Steps to reproduce

  • Pick editor mode plain text
  • Add an image to the signature
  • Open composer
  • See the image in the signature
  • Send message
  • Image missing

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@kesselb kesselb self-assigned this Jul 30, 2026
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
kesselb force-pushed the fix-html-signature-vs-plain-text branch from d0a9903 to 7aeb53f Compare July 31, 2026 17:08
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
kesselb force-pushed the fix-html-signature-vs-plain-text branch from 7aeb53f to 042814c Compare July 31, 2026 17:13
@kesselb
kesselb marked this pull request as ready for review July 31, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant