X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fcore%2Ffocusmanager.js;h=3f276c5e8104afc0a2623346177d8dacee98e3d5;hp=933c3cf4941c5dfbb2c9c727dfc6561aef57d222;hb=039a051ccf3901311661022a30afd60fc38130c9;hpb=c9fdde67e6384bd5a66adc2b3bba5c4ce9db56c7 diff --git a/_source/core/focusmanager.js b/_source/core/focusmanager.js index 933c3cf..3f276c5 100644 --- a/_source/core/focusmanager.js +++ b/_source/core/focusmanager.js @@ -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' ); + * }); */