CKEditor 4 Documentation

CKEDITOR.ui.handlerDefinition

Subclasses

Files

Virtual class which just illustrates the features of handler objects to be passed to the CKEDITOR.ui.addHandler function. This class is not really a part of the API, so do not call its constructor.

Defined By

Properties

CKEDITOR.ui.handlerDefinition
view source
: CKEDITOR.dom.elementreadonly
The element in the host page's document that contains the editor content. ...

The element in the host page's document that contains the editor content. If the fixed editor UI is used, then it will be set to editor.ui.space( 'contents' ) — i.e. the <div> which contains the editor <iframe> (in case of classic editor) or CKEDITOR.editable (in case of inline editor). Otherwise it is set to the CKEDITOR.editable itself.

Use the position of this element if you need to position elements placed in the host page's document relatively to the editor content.

var editor = CKEDITOR.instances.editor1;
console.log( editor.ui.contentsElement.getName() ); // 'div'

Available since: 4.5

Defined By

Methods

CKEDITOR.ui.handlerDefinition
view source
( definition ) : Object
Transforms an item definition into a UI item object. ...

Transforms an item definition into a UI item object.

editorInstance.ui.addHandler( CKEDITOR.UI_BUTTON, {
    create: function( definition ) {
        return new CKEDITOR.ui.button( definition );
    }
} );

Parameters

  • definition : Object

    The item definition.

Returns

  • Object

    The UI element. We lack the "UI element" abstract super class.