- /**\r
- * List of classes to use for indenting the contents.\r
- * @type Array\r
- * @example\r
- * // Don't use classes for indenting. (this is the default value)\r
- * config.indentClasses = null;\r
- * @example\r
- * // Use the classes 'Indent1', 'Indent2', 'Indent3'\r
- * config.indentClasses = ['Indent1', 'Indent2', 'Indent3'];\r
- */\r
+ // Switch the margins.\r
+ var marginLeft = node.getStyle( 'margin-right' ),\r
+ marginRight = node.getStyle( 'margin-left' );\r
+\r
+ marginLeft ? node.setStyle( 'margin-left', marginLeft ) : node.removeStyle( 'margin-left' );\r
+ marginRight ? node.setStyle( 'margin-right', marginRight ) : node.removeStyle( 'margin-right' );\r
+ }\r
+ }\r
+ });\r
+\r
+ editor.on( 'key', function( evt )\r
+ {\r
+ // Backspace at the beginning of list item should outdent it.\r
+ if ( editor.mode == 'wysiwyg' && evt.data.keyCode == 8 )\r
+ {\r
+ var sel = editor.getSelection(),\r
+ range = sel.getRanges()[ 0 ],\r
+ li;\r
+\r
+ if ( range.collapsed &&\r
+ ( li = range.startContainer.getAscendant( 'li', 1 ) ) &&\r
+ range.checkBoundaryOfElement( li, CKEDITOR.START ) )\r
+ {\r
+ editor.execCommand( 'outdent' );\r
+ evt.cancel();\r
+ }\r
+ }\r
+ });\r
+ },\r
+\r
+ requires : [ 'domiterator', 'list' ]\r
+ } );\r
+})();\r