{\r
var root = range.getCommonAncestor( true, true ),\r
element = root.getAscendant( this.element, true );\r
- element && setupElement( element, this );\r
+ element && !element.isReadOnly() && setupElement( element, this );\r
}\r
\r
function removeObjectStyle( range )\r
\r
while ( ( block = iterator.getNextParagraph() ) ) // Only one =\r
{\r
- var newBlock = getElement( this, doc, block );\r
- replaceBlock( block, newBlock );\r
+ if ( !block.isReadOnly() )\r
+ {\r
+ var newBlock = getElement( this, doc, block );\r
+ replaceBlock( block, newBlock );\r
+ }\r
}\r
\r
range.moveToBookmark( bookmark );\r
else\r
styleText = unparsedCssText;\r
\r
+ // Normalize font-family property, ignore quotes and being case insensitive. (#7322)\r
+ // http://www.w3.org/TR/css3-fonts/#font-family-the-font-family-property\r
+ styleText = styleText.replace( /(font-family:)(.*?)(?=;|$)/, function ( match, prop, val )\r
+ {\r
+ var names = val.split( ',' );\r
+ for ( var i = 0; i < names.length; i++ )\r
+ names[ i ] = CKEDITOR.tools.trim( names[ i ].replace( /["']/g, '' ) );\r
+ return prop + names.join( ',' );\r
+ });\r
+\r
// Shrinking white-spaces around colon and semi-colon (#4147).\r
// Compensate tail semi-colon.\r
return styleText.replace( /\s*([;:])\s*/, '$1' )\r