X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=_source%2Fcore%2Ffocusmanager.js;h=e59900ded0c7c71f65e800e0f4761b070ca9c007;hb=48b1db88210b4160dce439c6e3e32e14af8c106b;hp=933c3cf4941c5dfbb2c9c727dfc6561aef57d222;hpb=059b4c2fef02528bf1af189f7996e80652faddfb;p=ckeditor.git
diff --git a/_source/core/focusmanager.js b/_source/core/focusmanager.js
index 933c3cf..e59900d 100644
--- a/_source/core/focusmanager.js
+++ b/_source/core/focusmanager.js
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
@@ -9,11 +9,14 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
- * Manages the focus activity in an editor instance. This class is to be used
- * mainly by UI elements coders when adding interface elements to CKEditor.
- * @constructor
+ * Creates a focusManager class instance.
+ * @class Manages the focus activity in an editor instance. This class is to be
+ * used mainly by UI elements coders when adding interface elements that need
+ * to set the focus state of the editor.
* @param {CKEDITOR.editor} editor The editor instance.
* @example
+ * var focusManager = new CKEDITOR.focusManager( editor );
+ * focusManager.focus();
*/
CKEDITOR.focusManager = function( editor )
{
@@ -43,9 +46,10 @@ CKEDITOR.focusManager = function( editor )
CKEDITOR.focusManager.prototype =
{
/**
- * Indicates that the editor instance has the focus.
- *
- * This function is not used to set the focus in the editor. Use
+ * Used to indicate that the editor instance has the focus.
+ *
+ * Note that this function will not explicitelly set the focus in the
+ * editor (for example, making the caret blinking on it). Use
* {@link CKEDITOR.editor#focus} for it instead.
* @example
* var editor = CKEDITOR.instances.editor1;
@@ -76,10 +80,11 @@ CKEDITOR.focusManager.prototype =
},
/**
- * Indicates that the editor instance has lost the focus. Note that this
- * functions acts asynchronously with a delay of 100ms to avoid subsequent
- * blur/focus effects. If you want the "blur" to happen immediately, use
- * the {@link #forceBlur} function instead.
+ * Used to indicate that the editor instance has lost the focus.
+ *
+ * Note that this functions acts asynchronously with a delay of 100ms to
+ * avoid subsequent blur/focus effects. If you want the "blur" to happen
+ * immediately, use the {@link #forceBlur} function instead.
* @example
* var editor = CKEDITOR.instances.editor1;
* editor.focusManager.blur();
@@ -101,7 +106,7 @@ CKEDITOR.focusManager.prototype =
},
/**
- * Indicates that the editor instance has lost the focus. Unlike
+ * Used to indicate that the editor instance has lost the focus. Unlike
* {@link #blur}, this function is synchronous, marking the instance as
* "blured" immediately.
* @example
@@ -127,6 +132,11 @@ CKEDITOR.focusManager.prototype =
* @name CKEDITOR.editor#focus
* @event
* @param {CKEDITOR.editor} editor The editor instance.
+ * @example
+ * editor.on( 'focus', function( e )
+ * {
+ * alert( 'The editor named ' + e.editor.name + ' is now focused' );
+ * });
*/
/**
@@ -134,4 +144,9 @@ CKEDITOR.focusManager.prototype =
* @name CKEDITOR.editor#blur
* @event
* @param {CKEDITOR.editor} editor The editor instance.
+ * @example
+ * editor.on( 'blur', function( e )
+ * {
+ * alert( 'The editor named ' + e.editor.name + ' lost the focus' );
+ * });
*/