JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.1.1
[ckeditor.git] / _source / plugins / tab / plugin.js
index 6f848b4..f2adcf9 100644 (file)
@@ -5,6 +5,12 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 \r
 (function()\r
 {\r
+       var meta =\r
+       {\r
+               editorFocus : false,\r
+               modes : { wysiwyg:1, source:1 }\r
+       };\r
+\r
        var blurCommand =\r
                {\r
                        exec : function( editor )\r
@@ -39,7 +45,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                tabText += '\xa0';\r
 \r
                        // Register the "tab" and "shiftTab" commands.\r
-                       editor.addCommand( 'tab',\r
+                       editor.addCommand( 'tab', CKEDITOR.tools.extend(\r
                                {\r
                                        exec : function( editor )\r
                                        {\r
@@ -61,9 +67,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 \r
                                                return true;\r
                                        }\r
-                               });\r
+                               }, meta ) );\r
 \r
-                       editor.addCommand( 'shiftTab',\r
+                       editor.addCommand( 'shiftTab', CKEDITOR.tools.extend(\r
                                {\r
                                        exec : function( editor )\r
                                        {\r
@@ -74,10 +80,10 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 \r
                                                return true;\r
                                        }\r
-                               });\r
+                               }, meta ) );\r
 \r
-                       editor.addCommand( 'blur', blurCommand );\r
-                       editor.addCommand( 'blurBack', blurBackCommand );\r
+                       editor.addCommand( 'blur', CKEDITOR.tools.extend( blurCommand, meta ) );\r
+                       editor.addCommand( 'blurBack', CKEDITOR.tools.extend( blurBackCommand, meta ) );\r
                }\r
        });\r
 })();\r
@@ -104,7 +110,7 @@ CKEDITOR.dom.element.prototype.focusNext = function( ignoreChildren )
 \r
                element = this.getNextSourceNode( ignoreChildren, CKEDITOR.NODE_ELEMENT );\r
 \r
-               while( element )\r
+               while ( element )\r
                {\r
                        if ( element.isVisible() && element.getTabIndex() === 0 )\r
                        {\r
@@ -125,7 +131,7 @@ CKEDITOR.dom.element.prototype.focusNext = function( ignoreChildren )
 \r
                element = this.getDocument().getBody().getFirst();\r
 \r
-               while( ( element = element.getNextSourceNode( false, CKEDITOR.NODE_ELEMENT ) ) )\r
+               while ( ( element = element.getNextSourceNode( false, CKEDITOR.NODE_ELEMENT ) ) )\r
                {\r
                        if ( !passedCurrent )\r
                        {\r
@@ -188,7 +194,7 @@ CKEDITOR.dom.element.prototype.focusPrevious = function( ignoreChildren )
 \r
        var element = this.getDocument().getBody().getLast();\r
 \r
-       while( ( element = element.getPreviousSourceNode( false, CKEDITOR.NODE_ELEMENT ) ) )\r
+       while ( ( element = element.getPreviousSourceNode( false, CKEDITOR.NODE_ELEMENT ) ) )\r
        {\r
                if ( !passedCurrent )\r
                {\r