CKFinder 3 Documentation

CKFinder

The main API entry point with public methods to create CKFinder instances.

The access to CKFinder instance is given to plugins in their CKFinder.Plugin.init method.

Alternatively, it is also possible to provide a CKFinder.Config.onInit config parameter to register a callback that receives CKFinder.Application instance when CKFinder is ready.

CKFinder.popup( {
    onInit: function( finder ) {
        finder.request( 'dialog:info', { msg: 'It works!' } );
    }
} );
Defined By

Properties

CKFinder
: Object

Base path from which ckfinder.js file was loaded.

Base path from which ckfinder.js file was loaded.

Defined By

Methods

CKFinder
( config )
Setups the global CKFinder configuration. ...

Setups the global CKFinder configuration. Configuration methods precedence is explained in CKFinder.Config.

CKFinder.config( {
    lang: 'fr',
    skin: 'jquery-mobile',
    swatch: 'b'
} );

// This instance will use config: lang=en, skin=jquery-mobile, swatch=b
CKFinder.popup( {
    lang: 'en'
} );

Parameters

CKFinder
( [config] )
Opens CKFinder in a modal dialog window. ...

Opens CKFinder in a modal dialog window. See CKFinder in a Modal Window for more information.

CKFinder.modal( {
    width: 600,
    height: 400
} );

Parameters

CKFinder
( [config] )
Opens CKFinder in a popup window. ...

Opens CKFinder in a popup window. See CKFinder in a Popup window for more information.

Note: For IE9 modal is automatically used instead.

CKFinder.popup( {
    width: 600,
    height: 400
} );

Parameters

CKFinder
( [ckeditor], [config], [uploadUrlParams] )
Built-in method to integrate with CKEditor 4. ...

Built-in method to integrate with CKEditor 4. See CKEditor 4 Integration for more information.

Note: This method works only with CKEditor 4. If you want to integrate CKFinder with CKEditor 5, please refer to the CKEditor 5 Integration article.

var editor = CKEDITOR.replace( 'ckfinder' );
CKFinder.setupCKEditor( editor );

Parameters

  • ckeditor : CKEditor (optional)

    CKEditor instance.

  • config : CKFinder.Config (optional)

    CKFinder configuration.

  • uploadUrlParams : Object (optional)

    Parameters for ckeditor.config.filebrowserUploadUrl that will be appended to the URL used to upload files in CKEditor 4. You can use the type and currentFolder parameters to set the resource type and folder where the uploaded files will be stored. It is also possible to pass some custom parameters.

CKFinder
( [config] )
Creates CKFinder in current document. ...

Creates CKFinder in current document. Due to jQuery Mobile initialization method it will remove any previous DOM elements.

CKFinder.start( {
    onInit: function( finder ) {
        // finder = CKFinder instance
    }
} );

Parameters

CKFinder
( id, [config] )
Renders CKFinder inside given element. ...

Renders CKFinder inside given element. See Embedding as Widget for more information.

// '<div id="ckfinder1"></div>' must exist inside HTML page.

CKFinder.widget( 'ckfinder1', {
    width: 800,
    height: 700,
    onInit: function( finder ) {
        // finder = CKFinder instance
    }
} );

Parameters

  • id : String

    Id attribute of dom element in which CKFinder should be rendered.

  • config : CKFinder.Config (optional)

    Instance configuration.