Ticket #6901: 6901_2.patch
File 6901_2.patch, 2.0 KB (added by , 13 years ago) |
---|
-
_source/plugins/bidi/plugin.js
51 51 function handleMixedDirContent( evt ) 52 52 { 53 53 var editor = evt.editor, 54 chromeRoot = editor.container.getChild( 1 ),55 54 directionNode = evt.data.path.block || evt.data.path.blockLimit; 56 55 57 if ( directionNode && editor.lang.dir != directionNode.getComputedStyle( 'direction' ) ) 58 chromeRoot.addClass( 'cke_mixed_dir_content' ); 59 else 60 chromeRoot.removeClass( 'cke_mixed_dir_content' ); 56 editor.setMixedDirectionClass( directionNode && editor.lang.dir != directionNode.getComputedStyle( 'direction' ) ); 61 57 } 62 58 63 59 /** -
_source/themes/default/theme.js
341 341 }; 342 342 343 343 /** 344 * Applies and removes a class to all UI wrappers that indicates mixed BiDi contents in 345 * the area surrounding the current selection. 346 * @param {Boolean} [state] Whether the surrounding contetns include mixed BiDi contents. 347 * @example 348 * editor.setMixedDirectionClass( true ); 349 */ 350 CKEDITOR.editor.prototype.setMixedDirectionClass = function( state ) 351 { 352 var func = ( state ? 'add' : 'remove' ) + 'Class'; 353 354 this.container.getChild( 1 )[ func ]( 'cke_mixed_dir_content' ); 355 356 // Put the mixed direction class on the respective element also for shared spaces. 357 var toolbarSpace = this.sharedSpaces && this.sharedSpaces[ this.config.toolbarLocation ]; 358 if ( toolbarSpace ) 359 toolbarSpace.getParent().getParent()[ func ]( 'cke_mixed_dir_content' ); 360 }; 361 362 /** 344 363 * Makes it possible to place some of the editor UI blocks, like the toolbar 345 364 * and the elements path, into any element in the page. 346 365 * The elements used to hold the UI blocks can be shared among several editor