# CKEditor 3.0 JavaScript API Documentation

Code Index | File Index

## Namespaces

- CKEDITOR
- CKEDITOR.ajax
- CKEDITOR.config
- CKEDITOR.dom
- CKEDITOR.dtd
- CKEDITOR.env
- CKEDITOR.imageCacher
- CKEDITOR.loader
- CKEDITOR.plugins
- CKEDITOR.resourceManager
- CKEDITOR.scriptLoader
- CKEDITOR.skins
- CKEDITOR.test
- CKEDITOR.themes
- CKEDITOR.tools

## Classes

- CKEDITOR.commandDefinition
- CKEDITOR.dialog
- CKEDITOR.dialog.buttonDefinition
- CKEDITOR.dialog.contentDefinition
- CKEDITOR.dialog.contentDefinitionObject
- CKEDITOR.dialog.dialogDefinition
- CKEDITOR.dialog.dialogDefinitionObject
- CKEDITOR.dialog.uiElementDefinition
- CKEDITOR.dialogCommand
- CKEDITOR.dom.document
- CKEDITOR.dom.domObject
- CKEDITOR.dom.element
- CKEDITOR.dom.event
- CKEDITOR.dom.node
- CKEDITOR.dom.selection
- CKEDITOR.dom.text
- CKEDITOR.dom.window
- CKEDITOR.editor
- CKEDITOR.event
- CKEDITOR.eventInfo
- CKEDITOR.focusManager
- CKEDITOR.htmlParser
- CKEDITOR.htmlParser.cdata
- CKEDITOR.htmlParser.comment
- CKEDITOR.htmlParser.element
- CKEDITOR.htmlParser.fragment
- CKEDITOR.htmlParser.text
- CKEDITOR.htmlWriter
- CKEDITOR.keystrokeHandler
- CKEDITOR.pluginDefinition
- CKEDITOR.ui
- CKEDITOR.ui.button
- CKEDITOR.ui.dialog.button
- CKEDITOR.ui.dialog.checkbox
- CKEDITOR.ui.dialog.file
- CKEDITOR.ui.dialog.fileButton
- CKEDITOR.ui.dialog.hbox
- CKEDITOR.ui.dialog.html
- CKEDITOR.ui.dialog.labeledElement
- CKEDITOR.ui.dialog.radio
- CKEDITOR.ui.dialog.select
- CKEDITOR.ui.dialog.textarea
- CKEDITOR.ui.dialog.textInput
- CKEDITOR.ui.dialog.uiElement
- CKEDITOR.ui.dialog.vbox
- CKEDITOR.ui.handlerDefinition
- CKEDITOR.xml

# 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
--- | ---
| basePath The base directory containing all resources.
| externals Contains references to all resources that have already been registered with #addExternal.
| fileName The name used for resource files.
| loaded Contains references to all resources that have already been loaded with #load.
| registered 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.
| getFilePath(name) 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.

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

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.

{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-2009, CKSource - Frederico Knabben. All rights reserved.