public/ckeditor/_source/plugins/pastefromword/filter/default.js
function( element )
					{
						if ( CKEDITOR.env.gecko )
						{
							// Grab only the style definition section.
							var styleDefSection = element.onlyChild().value.match( /\/\* Style Definitions \*\/([\s\S]*?)\/\*/ ),
								styleDefText = styleDefSection && styleDefSection[ 1 ],
								rules = {}; // Storing the parsed result.

							if ( styleDefText )
							{
								styleDefText
									// Remove line-breaks.
									.replace(/[\n\r]/g,'')
									// Extract selectors and style properties.
									.replace( /(.+?)\{(.+?)\}/g,
										function( rule, selectors, styleBlock )
										{
											selectors = selectors.split( ',' );
											var length = selectors.length, selector;
											for ( var i = 0; i < length; i++ )
											{
												// Assume MS-Word mostly generate only simple
												// selector( [Type selector][Class selector]).
												CKEDITOR.tools.trim( selectors[ i ] )
															  .replace( /^(\w+)(\.[\w-]+)?$/g,
												function( match, tagName, className )
												{
													tagName = tagName || '*';
													className = className.substring( 1, className.length );

													// Reject MS-Word Normal styles.
													if ( className.match( /MsoNormal/ ) )
														return;

													if ( !rules[ tagName ] )
														rules[ tagName ] = {};
													if ( className )
														rules[ tagName ][ className ] = styleBlock;
													else
														rules[ tagName ] = styleBlock;
												} );
											}
										});

								filters.applyStyleFilter = function( element )
								{
									var name = rules[ '*' ] ? '*' : element.name,
										className = element.attributes && element.attributes[ 'class' ],
										style;
									if ( name in rules )
									{
										style = rules[ name ];
										if ( typeof style == 'object' )
											style = style[ className ];
										// Maintain style rules priorities.
										style && element.addStyle( style, true );
									}
								};
							}
						}
						return false;
					}
function( element )
					{
						if ( CKEDITOR.env.gecko )
						{
							// Grab only the style definition section.
							var styleDefSection = element.onlyChild().value.match( /\/\* Style Definitions \*\/([\s\S]*?)\/\*/ ),
								styleDefText = styleDefSection && styleDefSection[ 1 ],
								rules = {}; // Storing the parsed result.

							if ( styleDefText )
							{
								styleDefText
									// Remove line-breaks.
									.replace(/[\n\r]/g,'')
									// Extract selectors and style properties.
									.replace( /(.+?)\{(.+?)\}/g,
										function( rule, selectors, styleBlock )
										{
											selectors = selectors.split( ',' );
											var length = selectors.length, selector;
											for ( var i = 0; i < length; i++ )
											{
												// Assume MS-Word mostly generate only simple
												// selector( [Type selector][Class selector]).
												CKEDITOR.tools.trim( selectors[ i ] )
															  .replace( /^(\w+)(\.[\w-]+)?$/g,
												function( match, tagName, className )
												{
													tagName = tagName || '*';
													className = className.substring( 1, className.length );

													// Reject MS-Word Normal styles.
													if ( className.match( /MsoNormal/ ) )
														return;

													if ( !rules[ tagName ] )
														rules[ tagName ] = {};
													if ( className )
														rules[ tagName ][ className ] = styleBlock;
													else
														rules[ tagName ] = styleBlock;
												} );
											}
										});

								filters.applyStyleFilter = function( element )
								{
									var name = rules[ '*' ] ? '*' : element.name,
										className = element.attributes && element.attributes[ 'class' ],
										style;
									if ( name in rules )
									{
										style = rules[ name ];
										if ( typeof style == 'object' )
											style = style[ className ];
										// Maintain style rules priorities.
										style && element.addStyle( style, true );
									}
								};
							}
						}
						return false;
					}
function ( element ) { if ( CKEDITOR . env . gecko ) { // Grab only the style definition section.
 var styleDefSection = element . onlyChild ( ) . value . match ( / \/\* Style Definitions \*\/([\s\S]*?)\/\* / ) , styleDefText = styleDefSection && styleDefSection [ 1 ] , rules = { } ; // Storing the parsed result.
 if ( styleDefText ) { styleDefText // Remove line-breaks.
 . replace ( / [\n\r] / g , '' ) // Extract selectors and style properties.
 . replace ( / (.+?)\{(.+?)\} / g , function ( rule , selectors , styleBlock ) { selectors = selectors . split ( ',' ) ; var length = selectors . length , selector ; for ( var i = 0 ; i < length ; i ++ ) { // Assume MS-Word mostly generate only simple
 // selector( [Type selector][Class selector]).
 CKEDITOR . tools . trim ( selectors [ i ] ) . replace ( / ^(\w+)(\.[\w-]+)?$ / g , function ( match , tagName , className ) { tagName = tagName || '*' ; className = className . substring ( 1 , className . length ) ; // Reject MS-Word Normal styles.
 if ( className . match ( / MsoNormal / ) ) return ; if ( ! rules [ tagName ] ) rules [ tagName ] = { } ; if ( className ) rules [ tagName ] [ className ] = styleBlock ; else rules [ tagName ] = styleBlock ; } ) ; } } ) ; filters . applyStyleFilter = function ( element ) { var name = rules [ '*' ] ? '*' : element . name , className = element . attributes && element . attributes [ 'class' ] , style ; if ( name in rules ) { style = rules [ name ] ; if ( typeof style == 'object' ) style = style [ className ] ; // Maintain style rules priorities.
 style && element . addStyle ( style , true ) ; } } ; } } return false ; }
We'll drop any style sheet, but Firefox conclude certain styles in a single style element, which are required to be changed into inline ones.
We ll drop any style sheet but Firefox conclude certain styles in a single style element which are required to be changed into inline ones .