CKEditor 4 Documentation

CKEDITOR.resourceManager

Subclasses

Files

Base class for resource managers, like plugins. This class is not intended to be used out of the CKEditor core code.

Defined By

Properties

CKEDITOR.resourceManager
view source
: Objectprivate
...

Defaults to: {waitingList: {}}

CKEDITOR.resourceManager
view source
: String

The base directory containing all resources.

The base directory containing all resources.

CKEDITOR.resourceManager
view source
: Object
Contains references to all resources that have already been registered with addExternal. ...

Contains references to all resources that have already been registered with addExternal.

Defaults to: {}

CKEDITOR.resourceManager
view source
: String

The name used for resource files.

The name used for resource files.

CKEDITOR.resourceManager
view source
: Object
Contains references to all resources that have already been loaded with load. ...

Contains references to all resources that have already been loaded with load.

Defaults to: {}

CKEDITOR.resourceManager
view source
: Object
Contains references to all resources that have already been registered with add. ...

Contains references to all resources that have already been registered with add.

Defaults to: {}

Defined By

Methods

CKEDITOR.resourceManager
view source
new( basePath, fileName ) : CKEDITOR.resourceManager
Creates a resourceManager class instance. ...

Creates a resourceManager class instance.

Parameters

  • basePath : String

    The path for the resources folder.

  • fileName : String

    The name used for resource files.

Returns

CKEDITOR.resourceManager
view source
( name, [definition] )
Registers a resource. ...

Registers a resource.

CKEDITOR.plugins.add( 'sample', { ... plugin definition ... } );

Parameters

CKEDITOR.resourceManager
view source
( names, path, [fileName] )
Registers one or more resources to be loaded from an external path instead of the core base path. ...

Registers one or more resources to be loaded from an external path instead of the core base path.

// Loads a plugin from '/myplugins/sample/plugin.js'.
CKEDITOR.plugins.addExternal( 'sample', '/myplugins/sample/' );

// Loads a plugin from '/myplugins/sample/my_plugin.js'.
CKEDITOR.plugins.addExternal( 'sample', '/myplugins/sample/', 'my_plugin.js' );

// Loads a plugin from '/myplugins/sample/my_plugin.js'.
CKEDITOR.plugins.addExternal( 'sample', '/myplugins/sample/my_plugin.js', '' );

Parameters

  • names : String

    The resource names, separated by commas.

  • path : String

    The path of the folder containing the resource.

  • fileName : String (optional)

    The resource file name. If not provided, the default name is used. If provided with a empty string, will implicitly indicates that path argument is already the full path.

CKEDITOR.resourceManager
view source
( name ) : Object
Gets the definition of a specific resource. ...

Gets the definition of a specific resource.

var definition = CKEDITOR.plugins.get( 'sample' );

Parameters

  • name : String

    The resource name.

Returns

  • Object

    The registered object.

CKEDITOR.resourceManager
view source
( name ) : String
Get the file path for a specific loaded resource. ...

Get the file path for a specific loaded resource.

alert( CKEDITOR.plugins.getFilePath( 'sample' ) ); // '<editor path>/plugins/sample/plugin.js'

Parameters

  • name : String

    The resource name.

Returns

  • String
CKEDITOR.resourceManager
view source
( name ) : String
Get the folder path for a specific loaded resource. ...

Get the folder path for a specific loaded resource.

alert( CKEDITOR.plugins.getPath( 'sample' ) ); // '<editor path>/plugins/sample/'

Parameters

  • name : String

    The resource name.

Returns

  • String
CKEDITOR.resourceManager
view source
( name, callback, [scope] )
Loads one or more resources. ...

Loads one or more resources.

CKEDITOR.plugins.load( 'myplugin', function( plugins ) {
    alert( plugins[ 'myplugin' ] ); // object
} );

Parameters

  • name : String/Array

    The name of the resource to load. It may be a string with a single resource name, or an array with several names.

  • callback : Function

    A function to be called when all resources are loaded. The callback will receive an array containing all loaded names.

  • scope : Object (optional)

    The scope object to be used for the callback call.