# 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

# Namespace CKEDITOR.scriptLoader

Load scripts asynchronously.
Defined in: core/scriptloader.js.

Namespace Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| CKEDITOR.scriptLoader Load scripts asynchronously.

Method Summary
Method Attributes | Method Name and Description
--- | ---
<static> | CKEDITOR.scriptLoader.load(scriptUrl, callback, scope, noCheck) Loads one or more external script checking if not already loaded previously by this function.
<static> | CKEDITOR.scriptLoader.loadCode(code) Executes a JavaScript code into the current document.

Namespace Detail
CKEDITOR.scriptLoader
Since: 3.0
Load scripts asynchronously.
Method Detail
<static> {Undefined} CKEDITOR.scriptLoader.load(scriptUrl, callback, scope, noCheck)
Since: 3.0
Loads one or more external script checking if not already loaded previously by this function.

    CKEDITOR.scriptLoader.load( '/myscript.js' );

    CKEDITOR.scriptLoader.load( '/myscript.js', function( success )
        {
            // Alerts "true" if the script has been properly loaded.
            // HTTP error 404 should return "false".
            alert( success );
        });

    CKEDITOR.scriptLoader.load( [ '/myscript1.js', '/myscript2.js' ], function( completed, failed )
        {
            alert( 'Number of scripts loaded: ' + completed.length );
            alert( 'Number of failures: ' + failed.length );
        });

Parameters:
{String|Array} scriptUrl
  One or more URLs pointing to the scripts to be loaded.
{Function} callback Optional
  A function to be called when the script is loaded and executed. If a string is passed to "scriptUrl", a boolean parameter is passed to the callback, indicating the success of the load. If an array is passed instead, two array parameters are passed to the callback; the first contains the URLs that have been properly loaded, and the second the failed ones.
{Object} scope Optional
  The scope ("this" reference) to be used for the callback call. Default to CKEDITOR.
{Boolean} noCheck Optional
  Indicates that the script must be loaded anyway, not checking if it has already loaded.

<static> {Undefined} CKEDITOR.scriptLoader.loadCode(code)
Since: 3.0
Executes a JavaScript code into the current document.

    CKEDITOR.scriptLoader.loadCode( 'var x = 10;' );
    alert( x );  // "10"

Parameters:
{String} code
  The code to be executed.

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