CKEditor 4 Documentation

CKEDITOR.focusManager

Files

Manages the focus activity in an editor instance. This class is to be used mainly by UI element coders when adding interface elements that need to set the focus state of the editor.

var focusManager = new CKEDITOR.focusManager( editor );
focusManager.focus();
Defined By

Properties

CKEDITOR.focusManager
view source
: Objectprivate

Object used to store private stuff.

Object used to store private stuff.

Indicates the currently focused DOM element that makes the editor activated.

Indicates the currently focused DOM element that makes the editor activated.

CKEDITOR.focusManager
view source
: Boolean
Indicates that the editor instance has focus. ...

Indicates that the editor instance has focus.

alert( CKEDITOR.instances.editor1.focusManager.hasFocus ); // e.g. true

Defaults to: false

Defined By

Methods

CKEDITOR.focusManager
view source
new( editor ) : CKEDITOR.focusManager
Creates a focusManager class instance. ...

Creates a focusManager class instance.

Parameters

Returns

CKEDITOR.focusManager
view source
( element, isCapture )
Registers a UI DOM element to the focus manager, which will make the focus manager "hasFocus" once the input focus is...

Registers a UI DOM element to the focus manager, which will make the focus manager "hasFocus" once the input focus is relieved on the element. This method is designed to be used by plugins to expand the jurisdiction of the editor focus.

Parameters

CKEDITOR.focusManager
view source
( [noDelay] )
Used to indicate that the editor instance has been deactivated by the specified element which has just lost focus. ...

Used to indicate that the editor instance has been deactivated by the specified element which has just lost focus.

Note: This function acts asynchronously with a delay of 100ms to avoid temporary deactivation. Use the noDelay parameter instead to deactivate immediately.

var editor = CKEDITOR.instances.editor1;
editor.focusManager.blur();

Parameters

  • noDelay : Boolean (optional)

    Immediately deactivate the editor instance synchronously.

    Defaults to: false

CKEDITOR.focusManager
view source
( [currentActive] )
Indicates that this editor instance is activated (due to a DOM focus change). ...

Indicates that this editor instance is activated (due to a DOM focus change). The activated state is a symbolic indicator of an active user interaction session.

Note: This method will not introduce UI focus impact on DOM, it is here to record the editor UI focus state internally. If you want to make the cursor blink inside the editable, use CKEDITOR.editor.focus instead.

var editor = CKEDITOR.instances.editor1;
editor.focusManage.focus( editor.editable() );

Parameters

CKEDITOR.focusManager
view source
( )
Prevents from changing the focus manager state until the next unlock is called. ...

Prevents from changing the focus manager state until the next unlock is called.

CKEDITOR.focusManager
view source
( element )
Dismisses an element from the focus manager delegations added by add. ...

Dismisses an element from the focus manager delegations added by add.

Parameters

CKEDITOR.focusManager
view source
( )
Restores the automatic focus management if lock is called. ...

Restores the automatic focus management if lock is called.