CKEditor 4 Documentation

CKEDITOR.eventInfo

Files

Virtual class that illustrates the features of the event object to be passed to event listeners by a CKEDITOR.event based object.

This class is not really part of the API.

Defined By

Properties

CKEDITOR.eventInfo
view source
: Object
Any kind of additional data. ...

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' );
The editor instance that holds the sender. ...

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 );
CKEDITOR.eventInfo
view source
: Object
Any extra data appended during the listener registration. ...

Any extra data appended during the listener registration.

someObject.on( 'someEvent', function( event ) {
    alert( event.listenerData ); // 'Example'
}, null, 'Example' );
CKEDITOR.eventInfo
view source
: String
The event name. ...

The event name.

someObject.on( 'someEvent', function( event ) {
    alert( event.name ); // 'someEvent'
} );
someObject.fire( 'someEvent' );
CKEDITOR.eventInfo
view source
: Object
The object that publishes (sends) the event. ...

The object that publishes (sends) the event.

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

Methods

CKEDITOR.eventInfo
view source
( )
Indicates that the event is to be cancelled (if cancelable). ...

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' ) ); // false
CKEDITOR.eventInfo
view source
( )
Removes the current listener. ...

Removes the current listener.

someObject.on( 'someEvent', function( event ) {
    event.removeListener();
    // Now this function won't be called again by 'someEvent'.
} );
CKEDITOR.eventInfo
view source
( )
Indicates that no further listeners are to be called. ...

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' ) ); // true