Class

InputEventData (engine/view/observer)

@ckeditor/ckeditor5-engine/src/view/observer/inputobserver

class

The value of the event-beforeinput event.

Filtering

Properties

  • data : String | null

    readonly

    A unified text data passed along with the input event. Depending on:

    text data is sometimes passed in the data and sometimes in the dataTransfer property.

    • If InputEvent#data was set, this property reflects its value.
    • If InputEvent#data is unavailable, this property contains the 'text/plain' data from dataTransfer.
    • If the event (input type) provides no data whatsoever, this property is null.
  • dataTransfer : DataTransfer | null

    readonly

    The data transfer instance of the input event. Corresponds to native InputEvent#dataTransfer.

    The value is null when no dataTransfer was passed along with the input event.

  • inputType : String

    readonly

    The type of the input event (e.g. "insertText" or "deleteWordBackward"). Corresponds to native InputEvent#inputType.

  • isComposing : Boolean

    readonly

    A flag indicating that the beforeinput event was fired during composition.

  • target : Element

    readonly inherited

    The tree view element representing the target.

  • targetRanges : Array.<Range>

    readonly

    Editing view ranges corresponding to DOM ranges provided by the web browser (as returned by InputEvent#getTargetRanges()).

Methods

  • constructor( view, domEvent, [ additionalData ] )

    inherited

    Parameters

    view : View

    The instance of the view controller.

    domEvent : Event

    The DOM event.

    [ additionalData ] : Object

    Additional properties that the instance should contain.

  • preventDefault()

    inherited

    Prevents the native's event default action.

  • stopPropagation()

    inherited

    Stops native event propagation.