JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.2.1
[ckeditor.git] / _source / plugins / toolbar / plugin.js
index 4b59f6d..fd9fab0 100644 (file)
@@ -60,14 +60,15 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                        var itemKeystroke = function( item, keystroke )\r
                        {\r
                                var next, nextToolGroup, groupItemsCount;\r
+                               var rtl = editor.lang.dir == 'rtl';\r
 \r
                                switch ( keystroke )\r
                                {\r
-                                       case 39 :                                       // RIGHT-ARROW\r
+                                       case rtl ? 37 : 39 :                                    // RIGHT-ARROW\r
                                        case 9 :                                        // TAB\r
                                                do\r
                                                {\r
-                                                       // Look for the previous item in the toolbar.\r
+                                                       // Look for the next item in the toolbar.\r
                                                        next = item.next;\r
 \r
                                                        if ( !next )\r
@@ -99,7 +100,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 \r
                                                return false;\r
 \r
-                                       case 37 :                                       // LEFT-ARROW\r
+                                       case rtl ? 39 : 37 :                                    // LEFT-ARROW\r
                                        case CKEDITOR.SHIFT + 9 :       // SHIFT + TAB\r
                                                do\r
                                                {\r
@@ -284,6 +285,10 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                                                        editor.execCommand( 'toolbarCollapse' );\r
                                                                } );\r
 \r
+                                                       editor.on( 'destroy', function () {\r
+                                                                       CKEDITOR.tools.removeFunction( collapserFn );\r
+                                                               } );\r
+\r
                                                        var collapserId = 'cke_' + CKEDITOR.tools.getNextNumber();\r
 \r
                                                        editor.addCommand( 'toolbarCollapse',\r
@@ -408,7 +413,7 @@ CKEDITOR.config.toolbar_Basic =
  *     ['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'],\r
  *     '/',\r
  *     ['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],\r
- *     ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],\r
+ *     ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],\r
  *     ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],\r
  *     ['Link','Unlink','Anchor'],\r
  *     ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'],\r