Code Index | File Index

Namespaces

Classes


Function Namespace CKEDITOR.resourceManager


Defined in: core/resourcemanager.js.

Field Summary
Field Attributes Field Name and Description
 
The base directory containing all resources.
 
Contains references to all resources that have already been registered with #addExternal.
 
The name used for resource files.
 
Contains references to all resources that have already been loaded with #load.
 
Contains references to all resources that have already been registered with #add.
Method Summary
Method Attributes Method Name and Description
 
add(name, definition)
Registers a resource.
 
addExternal(names, path, fileName)
Registers one or more resources to be loaded from an external path instead of the core base path.
 
get(name)
Gets the definition of a specific resource.
 
Get the file path for a specific loaded resource.
 
getPath(name)
Get the folder path for a specific loaded resource.
 
load(name, callback, scope)
Loads one or more resources.
Field Detail
{String} basePath
Since: 3.0
The base directory containing all resources.

{Object} externals
Since: 3.0
Contains references to all resources that have already been registered with #addExternal.

{String} fileName
Since: 3.0
The name used for resource files.

{Object} loaded
Since: 3.0
Contains references to all resources that have already been loaded with #load.

{Object} registered
Since: 3.0
Contains references to all resources that have already been registered with #add.
Method Detail
{Undefined} add(name, definition)
Since: 3.0
Registers a resource.
CKEDITOR.plugins.add( 'sample', { ... plugin definition ... } );
Parameters:
{String} name
The resource name.
{Object} definition Optional
The resource definition.
See:
CKEDITOR.pluginDefinition

{Undefined} addExternal(names, path, fileName)
Since: 3.0
Registers one or more resources to be loaded from an external path instead of the core base path.
// Loads a plugin from '/myplugin/samples/plugin.js'.
CKEDITOR.plugins.addExternal( 'sample', '/myplugins/sample/' );
// Loads a plugin from '/myplugin/samples/my_plugin.js'.
CKEDITOR.plugins.addExternal( 'sample', '/myplugins/sample/', 'my_plugin.js' );
// Loads a plugin from '/myplugin/samples/my_plugin.js'.
CKEDITOR.plugins.addExternal( 'sample', '/myplugins/sample/my_plugin.js', '' );
Parameters:
{String} names
The resource names, separated by commas.
{String} path
The path of the folder containing the resource.
{String} fileName Optional
The resource file name. If not provided, the default name is used; If provided with a empty string, will implicitly indicates that {@param path} is already the full path.

{Object} get(name)
Since: 3.0
Gets the definition of a specific resource.
var definition = CKEDITOR.plugins.get( 'sample' );
Parameters:
{String} name
The resource name.

{String} getFilePath(name)
Since: 3.0
Get the file path for a specific loaded resource.
alert( CKEDITOR.plugins.getFilePath( 'sample' ) );  // "<editor path>/plugins/sample/plugin.js"
Parameters:
{String} name
The resource name.

{String} getPath(name)
Since: 3.0
Get the folder path for a specific loaded resource.
alert( CKEDITOR.plugins.getPath( 'sample' ) );  // "<editor path>/plugins/sample/"
Parameters:
{String} name
The resource name.

{Undefined} load(name, callback, scope)
Since: 3.0
Loads one or more resources.
CKEDITOR.plugins.load( 'myplugin', function( plugins )
    {
        alert( plugins['myplugin'] );  // "object"
    });
Parameters:
{String|Array} name
The name of the resource to load. It may be a string with a single resource name, or an array with several names.
{Function} callback
A function to be called when all resources are loaded. The callback will receive an array containing all loaded names.
{Object} scope Optional
The scope object to be used for the callback call.

Copyright © 2003-2010, CKSource - Frederico Knabben. All rights reserved.