Report an issue


class singleton

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.



  • editor : editor

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

    Note: This is not a jQuery object.

    var editor = $( 'textarea' ).ckeditor().editor;
  • promise : Function

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


  • chainable

    ckeditor( callback, config ) → Object

    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.


    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'
    } );




  • deprecated

    ckeditorGet() → Object

    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.




  • val() → Object

    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.



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