+ // Move direction attribute from root to list items.\r
+ function dirToListItems( list )\r
+ {\r
+ var dir = list.getDirection();\r
+ if ( dir )\r
+ {\r
+ for ( var i = 0, children = list.getChildren(), child; child = children.getItem( i ), i < children.count(); i++ )\r
+ {\r
+ if ( child.type == CKEDITOR.NODE_ELEMENT && child.is( 'li' ) && !child.getDirection() )\r
+ child.setAttribute( 'dir', dir );\r
+ }\r
+\r
+ list.removeAttribute( 'dir' );\r
+ }\r
+ }\r
+\r