# 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

# Class CKEDITOR.eventInfo

Defined in: core/eventInfo.js.

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| CKEDITOR.eventInfo() This class is not really part of the API.

Field Summary
Field Attributes | Field Name and Description
--- | ---
| data Any kind of additional data.
| editor The editor instance that holds the sender.
| listenerData Any extra data appended during the listener registration.
| name The event name.
| sender The object that publishes (sends) the event.

Method Summary
Method Attributes | Method Name and Description
--- | ---
| cancel() Indicates that the event is to be cancelled (if cancelable).
| stop() Indicates that no further listeners are to be called.

Class Detail
CKEDITOR.eventInfo()
Since: 3.0
This class is not really part of the API. It just illustrates the features of the event object passed to event listeners by a CKEDITOR.event based object.

    // Do not do this.
    var myEvent = new CKEDITOR.eventInfo();  // Error: CKEDITOR.eventInfo is undefined

Field Detail
{Object} data
Since: 3.0
Any kind of additional data. Its format and usage is event dependent.

    someObject.on( 'someEvent', function( event )
        {
            alert( event.data );  // "Example"
        });
    someObject.fire( 'someEvent', 'Example' );

{CKEDITOR.editor} editor
Since: 3.0
The editor instance that holds the sender. May be the same as sender. May be null if the sender is not part of an editor instance, like a component running in standalone mode.

    myButton.on( 'someEvent', function( event )
        {
            alert( event.editor == myEditor );  // "true"
        });
    myButton.fire( 'someEvent', null, myEditor );

{Object} listenerData
Since: 3.0
Any extra data appended during the listener registration.

    someObject.on( 'someEvent', function( event )
        {
            alert( event.listenerData );  // "Example"
        }
        , null, 'Example' );

{String} name
Since: 3.0
The event name.

    someObject.on( 'someEvent', function( event )
        {
            alert( event.name );  // "someEvent"
        });
    someObject.fire( 'someEvent' );

{Object} sender
Since: 3.0
The object that publishes (sends) the event.

    someObject.on( 'someEvent', function( event )
        {
            alert( event.sender == someObject );  // "true"
        });
    someObject.fire( 'someEvent' );

Method Detail
{Undefined} cancel()
Since: 3.0
Indicates that the event is to be cancelled (if cancelable).

    someObject.on( 'someEvent', function( event )
        {
            event.cancel();
        });
    someObject.on( 'someEvent', function( event )
        {
            // This one will not be called.
        });
    alert( someObject.fire( 'someEvent' ) );  // "true"

{Undefined} stop()
Since: 3.0
Indicates that no further listeners are to be called.

    someObject.on( 'someEvent', function( event )
        {
            event.stop();
        });
    someObject.on( 'someEvent', function( event )
        {
            // This one will not be called.
        });
    alert( someObject.fire( 'someEvent' ) );  // "false"

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