Class CKEDITOR.focusManager
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.
Defined in: core/focusmanager.js.
Constructor Attributes | Constructor Name and Description |
---|---|
CKEDITOR.focusManager(editor)
Creates a focusManager class instance.
|
Field Attributes | Field Name and Description |
---|---|
Indicates that the editor instance has focus.
|
Method Attributes | Method Name and Description |
---|---|
blur()
Used to indicate that the editor instance has lost the focus.
|
|
focus()
Used to indicate that the editor instance has the focus.
|
|
Used to indicate that the editor instance has lost the focus.
|
Class Detail
CKEDITOR.focusManager(editor)
Since:
3.0
Creates a focusManager class instance.
var focusManager = new CKEDITOR.focusManager( editor ); focusManager.focus();
- Parameters:
- {CKEDITOR.editor} editor
- The editor instance.
Field Detail
{Boolean}
hasFocus
Since:
3.0
Indicates that the editor instance has focus.
alert( CKEDITOR.instances.editor1.focusManager.hasFocus ); // e.g "true"
Method Detail
{Undefined}
blur()
Since:
3.0
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 #forceBlur function instead.
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 #forceBlur function instead.
var editor = CKEDITOR.instances.editor1; editor.focusManager.blur();
{Undefined}
focus()
Since:
3.0
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 CKEDITOR.editor#focus for it instead.
Note that this function will not explicitelly set the focus in the editor (for example, making the caret blinking on it). Use CKEDITOR.editor#focus for it instead.
var editor = CKEDITOR.instances.editor1; editor.focusManager.focus();
{Undefined}
forceBlur()
Since:
3.0
Used to indicate that the editor instance has lost the focus. Unlike
#blur, this function is synchronous, marking the instance as
"blured" immediately.
var editor = CKEDITOR.instances.editor1; editor.focusManager.forceBlur();