Ticket #4107: 4107.patch
File 4107.patch, 2.6 KB (added by , 14 years ago) |
---|
-
_source/plugins/styles/plugin.js
197 197 { 198 198 if ( attName == '_length' ) 199 199 continue; 200 if ( attribs[attName] == element.getAttribute( attName ) )200 if ( attribs[attName] == normalizeCssText( element.getAttribute( attName ), false ) ) 201 201 { 202 202 if ( !fullMatch ) 203 203 return true; … … 1177 1177 return overrides; 1178 1178 } 1179 1179 1180 function normalizeCssText( unparsedCssText )1180 function normalizeCssText( unparsedCssText, nativeNormalize ) 1181 1181 { 1182 // Injects the style in a temporary span object, so the browser parses it, 1183 // retrieving its final format. 1184 var temp = new CKEDITOR.dom.element( 'span' ); 1185 temp.setAttribute( 'style', unparsedCssText ); 1186 var styleText = temp.getAttribute( 'style' ); 1182 var styleText; 1183 if ( nativeNormalize != false ) 1184 { 1185 // Injects the style in a temporary span object, so the browser parses it, 1186 // retrieving its final format. 1187 var temp = new CKEDITOR.dom.element( 'span' ); 1188 temp.setAttribute( 'style', unparsedCssText ); 1189 styleText = temp.getAttribute( 'style' ); 1190 } 1191 else 1192 styleText = unparsedCssText; 1193 1194 // Normalize font-family style text across browsers.(#4107). 1195 styleText = styleText.replace(/^font-family: ([\w -]+)((:?,\s+[\w -]+)*);/, function( match, g1, g2 ) 1196 { 1197 return 'font-family: ' + g1 + 1198 ( g2 ? g2.replace( /,\s+([\w -]+)/g, function( match, g1 ) 1199 { 1200 return ',' + g1; 1201 } ) : '' ) + 1202 ';'; 1203 } ).toLowerCase(); 1204 1187 1205 // IE will leave a single semicolon when failed to parse the style text.(#3891) 1188 1206 return styleText == ';' ? '' : styleText; 1189 1207 } -
CHANGES.html
185 185 <li><a href="http://dev.fckeditor.net/ticket/4075">#4075</a> : [IE6/7]Fixed apply custom inline style with "class" attribute failed.</li> 186 186 <li><a href="http://dev.fckeditor.net/ticket/4087">#4087</a> : [Firefox]Fixed extra blocks created on create list when full document selected.</li> 187 187 <li><a href="http://dev.fckeditor.net/ticket/4097">#4097</a> : No undo/redo support for fontColor and backgroundColor buttons.</li> 188 <li><a href="http://dev.fckeditor.net/ticket/4107">#4107</a> : Fixed font style inconsistency across browsers.</li> 188 189 </ul> 189 190 <h3> 190 191 CKEditor 3.0 RC</h3>