Skip to content

fix(settings): respect the writing mode in the signature editor#13141

Open
joeldj-nl wants to merge 1 commit into
nextcloud:mainfrom
joeldj-nl:fix/signature-editor-writing-mode
Open

fix(settings): respect the writing mode in the signature editor#13141
joeldj-nl wants to merge 1 commit into
nextcloud:mainfrom
joeldj-nl:fix/signature-editor-writing-mode

Conversation

@joeldj-nl

Copy link
Copy Markdown

Fixes #7142

Summary

The signature editor always used rich text mode, even when the account was configured to compose messages as plain text. As a result, signatures containing images or other HTML content could be exposed as raw HTML after switching to plain text mode.

Changes

  • Use the account’s configured writing mode for the signature editor.
  • Re-encode the saved signature when switching between rich text and plain text modes.
  • Warn before switching from rich text to plain text, since that conversion drops formatting, inline images, including content in the signature.
recording-writing-mode.mp4

Assisted-by: Claude:claude-opus-4-8

The signature editor was always rich text, so a signature image was
mangled into raw HTML when the account's writing mode was plain text.

- Drive the signature editor's mode from the account's writing mode and
  re-encode the signature to the active format (HTML or plain text).
- Warn before switching from rich text to plain text, since that drops
  formatting, inline images and links — including those in the signature.

Fixes nextcloud#7142

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Joël de Jager <contact@joeldejager.nl>
@ChristophWurst

Copy link
Copy Markdown
Member

I wasn't familiar with #7142 and I'm a bit unsure about the approach.

I checked Gmail as reference and they just have the rich signature editor like we currently have. The only thing they do better is when you actually compose an email the writing mode dictates if HTML is stripped to plain text for the signature.

cc @kesselb @nimishavijay

@ChristophWurst ChristophWurst self-assigned this Jun 24, 2026
@ChristophWurst ChristophWurst added bug 3. to review feature:editor All bugs, features and pull requests about the (HTML) editor labels Jun 24, 2026
@nimishavijay

nimishavijay commented Jul 2, 2026

Copy link
Copy Markdown
Member

Makes sense for it to respect the writing mode in general, as the root problem is that people don't know what their signaure will look like in the end. if we are able to communicate this up front as much as possible it is a good thing.

Additionally, since I think a lot of people don't even look at the "writing mode" section in the settings when they just want to add/edit their signature, I would add the option to enable formatting from the signature editor as well, in that case the writing mode switches to rich text automatically.

And instead of a blocking modal, I would instead change the UI of the writing mode to include a subline explaining that formatting from signatures will also be removed. That way it's a bit less disruptive. @ChristophWurst What are your thoughts?

@ChristophWurst

Copy link
Copy Markdown
Member

I would add the option to enable formatting from the signature editor as well, in that case the writing mode switches to rich text automatically.

Then we have to buttons to change the writing mode, no?

My idea with the HTML signature is that you can use it in any writing mode. Doesn't matter what you set as default. Doesn't matter what you set for an email.

If the switch is part of the sigature then we will probably have to strip HTML to plain when going to plain mode, and from that point you can not go back, nor will you have formatting in an HTML email.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review bug feature:editor All bugs, features and pull requests about the (HTML) editor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add image support to the text editor: Use editor mode for signature editor

3 participants