JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.4.2
[ckeditor.git] / _source / core / focusmanager.js
index 933c3cf..3f276c5 100644 (file)
@@ -9,11 +9,14 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
  */\r
 \r
 /**\r
- * Manages the focus activity in an editor instance. This class is to be used\r
- * mainly by UI elements coders when adding interface elements to CKEditor.\r
- * @constructor\r
+ * Creates a focusManager class instance.\r
+ * @class Manages the focus activity in an editor instance. This class is to be\r
+ * used mainly by UI elements coders when adding interface elements that need\r
+ * to set the focus state of the editor.\r
  * @param {CKEDITOR.editor} editor The editor instance.\r
  * @example\r
+ * var focusManager = <b>new CKEDITOR.focusManager( editor )</b>;\r
+ * focusManager.focus();\r
  */\r
 CKEDITOR.focusManager = function( editor )\r
 {\r
@@ -43,9 +46,10 @@ CKEDITOR.focusManager = function( editor )
 CKEDITOR.focusManager.prototype =\r
 {\r
        /**\r
-        * Indicates that the editor instance has the focus.\r
-        *\r
-        * This function is not used to set the focus in the editor. Use\r
+        * Used to indicate that the editor instance has the focus.<br />\r
+        * <br />\r
+        * Note that this function will not explicitelly set the focus in the\r
+        * editor (for example, making the caret blinking on it). Use\r
         * {@link CKEDITOR.editor#focus} for it instead.\r
         * @example\r
         * var editor = CKEDITOR.instances.editor1;\r
@@ -76,10 +80,11 @@ CKEDITOR.focusManager.prototype =
        },\r
 \r
        /**\r
-        * Indicates that the editor instance has lost the focus. Note that this\r
-        * functions acts asynchronously with a delay of 100ms to avoid subsequent\r
-        * blur/focus effects. If you want the "blur" to happen immediately, use\r
-        * the {@link #forceBlur} function instead.\r
+        * Used to indicate that the editor instance has lost the focus.<br />\r
+        * <br />\r
+        * Note that this functions acts asynchronously with a delay of 100ms to\r
+        * avoid subsequent blur/focus effects. If you want the "blur" to happen\r
+        * immediately, use the {@link #forceBlur} function instead.\r
         * @example\r
         * var editor = CKEDITOR.instances.editor1;\r
         * <b>editor.focusManager.blur()</b>;\r
@@ -101,7 +106,7 @@ CKEDITOR.focusManager.prototype =
        },\r
 \r
        /**\r
-        * Indicates that the editor instance has lost the focus. Unlike\r
+        * Used to indicate that the editor instance has lost the focus. Unlike\r
         * {@link #blur}, this function is synchronous, marking the instance as\r
         * "blured" immediately.\r
         * @example\r
@@ -127,6 +132,11 @@ CKEDITOR.focusManager.prototype =
  * @name CKEDITOR.editor#focus\r
  * @event\r
  * @param {CKEDITOR.editor} editor The editor instance.\r
+ * @example\r
+ * editor.on( 'focus', function( e )\r
+ *     {\r
+ *         alert( 'The editor named ' + e.editor.name + ' is now focused' );\r
+ *     });\r
  */\r
 \r
 /**\r
@@ -134,4 +144,9 @@ CKEDITOR.focusManager.prototype =
  * @name CKEDITOR.editor#blur\r
  * @event\r
  * @param {CKEDITOR.editor} editor The editor instance.\r
+ * @example\r
+ * editor.on( 'blur', function( e )\r
+ *     {\r
+ *         alert( 'The editor named ' + e.editor.name + ' lost the focus' );\r
+ *     });\r
  */\r