Code Index | File Index

Namespaces

Classes


Function Namespace CKEDITOR.resourceManager

Base class for resource managers, like plugins and themes. This class is not intended to be used out of the CKEditor core code.
Defined in: core/resourcemanager.js.

Function Namespace Summary
Constructor Attributes Constructor Name and Description
 
CKEDITOR.resourceManager(basePath, fileName)
Base class for resource managers, like plugins and themes.
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(name, path)
Registers a resource to be loaded from an external path instead of the core base path.
 
get(name)
Gets the definition of a specific resource.
 
getPath(name)
Get the full path for a specific loaded resource.
 
load(name, callback, scope)
Loads one or more resources.
Function Namespace Detail
CKEDITOR.resourceManager(basePath, fileName)
Since: 3.0
Base class for resource managers, like plugins and themes. This class is not intended to be used out of the CKEditor core code.
Parameters:
{String} basePath
The path for the resources folder.
{String} fileName
The name used for resource files.
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(name, path)
Since: 3.0
Registers a resource 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/' );
Parameters:
{String} name
The resource name.
{String} path
The resource external 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} getPath(name)
Since: 3.0
Get the full 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-2009, CKSource - Frederico Knabben. All rights reserved.