Ticket #7784: 7784.patch
File 7784.patch, 1.8 KB (added by , 13 years ago) |
---|
-
_source/plugins/stylesheetparser/plugin.js
102 102 // Do this only once 103 103 e.removeListener(); 104 104 105 editor.getStylesSet( function( stylesDefinitions ) 106 { 107 // Rules that must be skipped 108 var skipSelectors = editor.config.stylesheetParser_skipSelectors || ( /(^body\.|^\.)/i ), 109 // Rules that are valid 110 validSelectors = editor.config.stylesheetParser_validSelectors || ( /\w+\.\w+/ ); 105 // Use a delay before parsing the stylesheet to avoid errors with Firefox 4. #7784 106 window.setTimeout( function() { 107 editor.getStylesSet( function( stylesDefinitions ) 108 { 109 // Rules that must be skipped 110 var skipSelectors = editor.config.stylesheetParser_skipSelectors || ( /(^body\.|^\.)/i ), 111 // Rules that are valid 112 validSelectors = editor.config.stylesheetParser_validSelectors || ( /\w+\.\w+/ ); 111 113 112 // Add the styles found in the document113 editor._.stylesDefinitions = stylesDefinitions.concat( LoadStylesCSS( editor.document.$, skipSelectors, validSelectors ) );114 // Add the styles found in the document 115 editor._.stylesDefinitions = stylesDefinitions.concat( LoadStylesCSS( editor.document.$, skipSelectors, validSelectors ) ); 114 116 115 // Refresh the styles combo 116 var combo = editor.ui._.items[ 'Styles' ]; 117 combo && combo.args[ 0 ].reset(); 118 } ); 117 // Refresh the styles combo 118 var combo = editor.ui._.items[ 'Styles' ]; 119 combo && combo.args[ 0 ].reset(); 120 } ); 121 }, 0); 119 122 }); 120 123 121 124 }