Ticket #4512: 4512.patch
File 4512.patch, 1.2 KB (added by , 15 years ago) |
---|
-
_source/plugins/styles/plugin.js
80 80 var blockElements = { address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1 }; 81 81 var objectElements = { a:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1,ul:1 }; 82 82 83 var semicolonFixRegex = /\s*(?:;\s*|$)/; 83 var semicolonFixRegex = /\s*(?:;\s*|$)/, 84 fixSemicolon = function( styleText ) 85 { 86 return styleText.replace( semicolonFixRegex, ';' ); 87 }; 84 88 85 89 CKEDITOR.style = function( styleDefinition, variablesValues ) 86 90 { … … 264 268 var stylesText = ( styleDefinition.attributes && styleDefinition.attributes[ 'style' ] ) || ''; 265 269 266 270 if ( stylesText.length ) 267 stylesText = stylesText.replace( semicolonFixRegex, ';');271 stylesText = fixSemicolon( stylesText ); 268 272 269 273 for ( var style in stylesDef ) 270 stylesText += style + ':' + stylesDef[ style ] + ';';274 stylesText += fixSemicolon( style + ':' + stylesDef[ style ] ); 271 275 272 276 // Browsers make some changes to the style when applying them. So, here 273 277 // we normalize it to the browser format.