File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1062,6 +1062,18 @@ function tiny_init(container) {
10621062 }
10631063 } ) ;
10641064
1065+ // FIX: TinyMCE 8 HTML5-Schema beschränkt <span> auf [class|title] und
1066+ // strippt deshalb beim Serialisieren das style-Attribut (z. B. forecolor,
1067+ // backcolor, font-size). Wir erweitern die span-Regel hier explizit, damit
1068+ // inline-styled Spans (Farben, Größen, etc.) im getContent()-Output erhalten
1069+ // bleiben. Ohne diesen Patch verlieren Color-Toolbars und Style-Formate mit
1070+ // inline:'span' ihre style-Attribute beim Speichern.
1071+ editor . on ( 'PreInit' , function ( ) {
1072+ if ( editor . schema && typeof editor . schema . addValidElements === 'function' ) {
1073+ editor . schema . addValidElements ( 'span[class|style|title|id|lang|dir|data-mce-*]' ) ;
1074+ }
1075+ } ) ;
1076+
10651077 // Register all formats so they work when applied.
10661078 // Only include defined properties in the spec – passing undefined values
10671079 // can confuse TinyMCE's internal format detection logic.
You can’t perform that action at this time.
0 commit comments