feat(editor): preserve arbitrary font sizes and families in content#12984
feat(editor): preserve arbitrary font sizes and families in content#12984dagyu wants to merge 1 commit into
Conversation
|
Thanks for the changes
It would be best if you could provide before and after screenshots that demo the change in addition to textual steps to reproduce. Please point your agents to AGENTS.md to fix the commit footer. |
|
@ChristophWurst I update the commit footer as written in Following videos show exactly the bug that I had, without the patch it is impossible for me to customize the font size cause the editor doesn't preserve the values. First video is current main version, second one is the patched version. OLD.movNEW.mov |
The rich-text composer's Font plugins (FontSize/FontFamily) run with their default presets and supportAllValues disabled. As a result any font-size or font-family that is not one of the built-in presets is silently dropped when HTML is inserted or pasted into the editor — most visibly, signatures or pasted content lose their typography on send. Enable supportAllValues on both plugins so inline font-size and font-family survive the editor round-trip. FontSize additionally requires numeric options when supportAllValues is set (named presets such as "big"/"huge" are incompatible and throw at init), so the options list is switched to numeric point/pixel sizes. Assisted-by: Claude:claude-opus-4-7 Signed-off-by: dagyu <dagyu95dev@gmail.com>
GretaD
left a comment
There was a problem hiding this comment.
tested and it works, thanks a lot
|
Can you tell me please if you are planning to put this in the next release? Because I need it so if you can't I will install patched version |
Problem — custom HTML signatures don't work
Setting a custom HTML signature (a branded block with specific fonts and
sizes — e.g. a 13pt name, 11pt role/phone, 9pt address, a logo and links) is a
common, reasonable requirement. Today it's effectively impossible to do
faithfully through Mail: the signature is stored correctly, looks correct in
account settings, but loses its typography the moment it passes through the
composer, and reaches recipients with the wrong size and font.
Concretely, given a signature span like:
<span style="color:#3c3c3b;font-family:Arial,Helvetica,sans-serif;font-size:13pt">…</span>the recipient receives:
<span style="color:#3c3c3b">…</span>← font-size and font-family gone.colorsurvives;font-sizeandfont-familyare dropped. There is no way towork around it from the signature HTML — the loss happens inside the editor.
Root cause
The composer's CKEditor
FontSize/FontFamilyplugins run with theirdefault presets and
supportAllValuesdisabled. When signature/pasted HTML isinserted into the editor, any
font-sizeorfont-familythat isn't one ofthe built-in presets is stripped during the model round-trip. (
coloris keptbecause
FontColoraccepts all values by default — which is exactly thebehaviour size/family should have too.)
Fix
Enable
supportAllValues: trueon both Font plugins so inlinefont-sizeandfont-familysurvive: