Report an issue
Class

CKEDITOR.eventInfo

class abstract

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.

Filtering

Properties

  • data : Object

    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' );
    
  • editor : editor

    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 );
    
  • listenerData : Object

    Any extra data appended during the listener registration.

    someObject.on( 'someEvent', function( event ) {
        alert( event.listenerData ); // 'Example'
    }, null, 'Example' );
    
  • name : String

    The event name.

    someObject.on( 'someEvent', function( event ) {
        alert( event.name ); // 'someEvent'
    } );
    someObject.fire( 'someEvent' );
    
  • sender : Object

    The object that publishes (sends) the event.

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

Methods

  • cancel()

    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
    
  • removeListener()

    Removes the current listener.

    someObject.on( 'someEvent', function( event ) {
        event.removeListener();
        // Now this function won't be called again by 'someEvent'.
    } );
    
  • stop()

    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