Changeset 5997
- Timestamp:
- 10/26/10 09:01:36 (3 years ago)
- Location:
- CKEditor/trunk
- Files:
-
- 2 edited
-
CHANGES.html (modified) (1 diff)
-
_source/plugins/justify/plugin.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
CKEditor/trunk/CHANGES.html
r5996 r5997 88 88 <li><a href="http://dev.ckeditor.com/ticket/5626">#5626</a> : CKeditor 3.2.1 : html content attached makes ckeditor crash the browser FF/IE.</li> 89 89 <li><a href="http://dev.ckeditor.com/ticket/6508">#6508</a> : BiDi: Margin mirroring logic doesn't honor CSS direction.</li> 90 <li><a href="http://dev.ckeditor.com/ticket/6043">#6043</a> : BIDI: When we apply RTL direction to a right aligned Paragraph, Paragraph is not moved to left & Alignment of Paragraph is not changed.</li> 90 91 <li>Updated the following language files:<ul> 91 92 <li><a href="http://dev.ckeditor.com/ticket/6427">#6427</a> : Ukrainian;</li> -
CKEditor/trunk/_source/plugins/justify/plugin.js
r5949 r5997 80 80 81 81 this.cssClassRegex = new RegExp( '(?:^|\\s+)(?:' + classes.join( '|' ) + ')(?=$|\\s)' ); 82 } 83 } 84 85 function onDirChanged( e ) 86 { 87 var editor = e.editor; 88 89 var range = new CKEDITOR.dom.range( editor.document ); 90 range.setStartBefore( e.data ); 91 range.setEndAfter( e.data ); 92 93 var walker = new CKEDITOR.dom.walker( range ), 94 node; 95 96 while ( node = walker.next() ) 97 { 98 if ( node.type == CKEDITOR.NODE_ELEMENT ) 99 { 100 // A child with the defined dir is to be ignored. 101 if ( !node.equals( e.data ) && node.getDirection() ) 102 { 103 range.setStartAfter( node ); 104 walker = new CKEDITOR.dom.walker( range ); 105 continue; 106 } 107 108 // Switch the alignment. 109 var style = 'text-align'; 110 var align = node.getStyle( style ); 111 112 if ( align == 'left' ) 113 node.setStyle( style, 'right' ); 114 else if ( align == 'right' ) 115 node.setStyle( style, 'left' ); 116 } 82 117 } 83 118 } … … 179 214 editor.on( 'selectionChange', CKEDITOR.tools.bind( onSelectionChange, center ) ); 180 215 editor.on( 'selectionChange', CKEDITOR.tools.bind( onSelectionChange, justify ) ); 216 editor.on( 'dirChanged', onDirChanged ); 181 217 }, 182 218
Note: See TracChangeset
for help on using the changeset viewer.
