CKEditor 4 Documentation

CKEDITOR_Adapters.jQuery

Files

The jQuery Adapter allows for easy use of basic CKEditor functions and access to the internal API. To find more information about the jQuery Adapter, go to the jQuery Adapter section of the Developer's Guide or see the "Create Editors with jQuery" sample.

Defined By

Properties

CKEDITOR_Adapters.jQuery
view source
: CKEDITOR.editor
Existing CKEditor instance. ...

Existing CKEditor instance. Allows to easily use the internal API.

Note: This is not a jQuery object.

var editor = $( 'textarea' ).ckeditor().editor;
CKEDITOR_Adapters.jQuery
view source
: Function
The jQuery Promise object) that handles the asynchronous constructor. ...

The jQuery Promise object) that handles the asynchronous constructor. This promise will be resolved after all of the constructors.

Defined By

Methods

CKEDITOR_Adapters.jQuery
view source
( callback, config ) : Objectchainable
A jQuery function which triggers the creation of CKEditor with <textarea> and editable elements. ...

A jQuery function which triggers the creation of CKEditor with <textarea> and editable elements. Every <textarea> element will be converted to a classic (iframe-based) editor, while any other supported element will be converted to an inline editor. This method binds the callback to the instanceReady event of all instances. If the editor has already been created, the callback is fired straightaway. You can also create multiple editors at once by using $( '.className' ).ckeditor();.

Note: jQuery chaining and mixed parameter order is allowed.

Parameters

  • callback : Function

    Function to be run on the editor instance. Callback takes the source element as a parameter.

    $( 'textarea' ).ckeditor( function( textarea ) {
        // Callback function code.
    } );
    
  • config : Object

    Configuration options for new instance(s) if not already created.

    $( 'textarea' ).ckeditor( {
        uiColor: '#9AB8F3'
    } );
    

Returns

  • Object

    jQuery.fn

CKEDITOR_Adapters.jQuery
view source
( ) : Objectdeprecated
Returns an existing CKEditor instance for the first matched element. ...

Returns an existing CKEditor instance for the first matched element. Allows to easily use the internal API. Does not return a jQuery object.

Raises an exception if the editor does not exist or is not ready yet.

This method has been deprected

Use editor property instead.

Returns

CKEDITOR_Adapters.jQuery
view source
( ) : Object
Overwritten jQuery val() method for <textarea> elements that have bound CKEditor instances. ...

Overwritten jQuery val() method for <textarea> elements that have bound CKEditor instances. This method gets or sets editor content by using the editor.getData() or editor.setData() methods. To handle the editor.setData() callback (as setData is asynchronous), val( 'some data' ) will return a jQuery Promise object.

Returns

  • Object

    String|Number|Array|jQuery.fn|function(jQuery Promise)

Defined By

Events

CKEDITOR_Adapters.jQuery
view source
( evt )
Forwards the CKEditor dataReady event as a jQuery event. ...

Forwards the CKEditor dataReady event as a jQuery event.

Parameters

CKEDITOR_Adapters.jQuery
view source
( evt )
Forwards the CKEditor destroy event as a jQuery event. ...

Forwards the CKEditor destroy event as a jQuery event.

Parameters

CKEDITOR_Adapters.jQuery
view source
( evt )
Forwards the CKEditor getData event as a jQuery event. ...

Forwards the CKEditor getData event as a jQuery event.

Parameters

CKEDITOR_Adapters.jQuery
view source
( evt )
Forwards the CKEditor instanceReady event as a jQuery event. ...

Forwards the CKEditor instanceReady event as a jQuery event.

Parameters

CKEDITOR_Adapters.jQuery
view source
( evt )
Forwards the CKEditor setData event as a jQuery event. ...

Forwards the CKEditor setData event as a jQuery event.

Parameters