Changeset 20054
- Timestamp:
- 02/29/2012 11:06:24 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js
r19990 r20054 64 64 } 65 65 }); 66 66 67 67 ed.addCommand('WP_Medialib', function() { 68 68 var id = ed.getParam('wp_fullscreen_editor_id') || ed.getParam('fullscreen_editor_id') || ed.id, … … 145 145 } 146 146 }); 147 147 148 148 ed.onInit.add(function(ed) { 149 var bodyClass = ed.getParam('body_class', ''); 149 var bodyClass = ed.getParam('body_class', ''), body = ed.getBody(); 150 151 // add body classes 152 if ( bodyClass ) 153 bodyClass = bodyClass.split(' '); 154 else 155 bodyClass = []; 156 157 if ( ed.getParam('directionality', '') == 'rtl' ) 158 bodyClass.push('rtl'); 159 160 if ( tinymce.isIE9 ) 161 bodyClass.push('ie9'); 162 else if ( tinymce.isIE8 ) 163 bodyClass.push('ie8'); 164 else if ( tinymce.isIE7 ) 165 bodyClass.push('ie7'); 166 167 if ( ed.id != 'wp_mce_fullscreen' && ed.id != 'mce_fullscreen' ) 168 bodyClass.push('wp-editor'); 169 else if ( ed.id == 'mce_fullscreen' ) 170 bodyClass.push('mce-fullscreen'); 171 172 tinymce.each( bodyClass, function(cls){ 173 if ( cls ) 174 ed.dom.addClass(body, cls); 175 }); 150 176 151 177 // make sure these run last … … 172 198 }); 173 199 174 if ( ed.id != 'wp_mce_fullscreen' && ed.id != 'mce_fullscreen' )175 ed.dom.addClass(ed.getBody(), 'wp-editor');176 else if ( ed.id == 'mce_fullscreen' )177 ed.dom.addClass(ed.getBody(), 'mce-fullscreen');178 179 200 // remove invalid parent paragraphs when pasting HTML and/or switching to the HTML editor and back 180 201 ed.onBeforeSetContent.add(function(ed, o) { … … 184 205 } 185 206 }); 186 187 if ( bodyClass )188 ed.dom.addClass(ed.getBody(), bodyClass);189 207 }); 190 208
Note: See TracChangeset
for help on using the changeset viewer.