InputEventData (engine/view/observer)
@ckeditor/ckeditor5-engine/src/view/observer/inputobserver
The value of the event-beforeinput
event.
Filtering
Properties
-
data : String | null
module:engine/view/observer/inputobserver~InputEventData#data
readonly
A unified text data passed along with the input event. Depending on:
- the web browser and input events implementation (for instance Level 1 or Level 2),
- input type
text data is sometimes passed in the
data
and sometimes in thedataTransfer
property.- If
InputEvent#data
was set, this property reflects its value. - If
InputEvent#data
is unavailable, this property contains the'text/plain'
data fromdataTransfer
. - If the event (input type)
provides no data whatsoever, this property is
null
.
-
dataTransfer : DataTransfer | null
module:engine/view/observer/inputobserver~InputEventData#dataTransfer
readonly
The data transfer instance of the input event. Corresponds to native
InputEvent#dataTransfer
.The value is
null
when nodataTransfer
was passed along with the input event. -
inputType : String
module:engine/view/observer/inputobserver~InputEventData#inputType
readonly
The type of the input event (e.g. "insertText" or "deleteWordBackward"). Corresponds to native
InputEvent#inputType
. -
isComposing : Boolean
module:engine/view/observer/inputobserver~InputEventData#isComposing
readonly
A flag indicating that the
beforeinput
event was fired during composition.Corresponds to the
event-compositionstart
,event-compositionupdate
, andevent-compositionend
trio. -
The tree view element representing the target.
-
targetRanges : Array.<Range>
module:engine/view/observer/inputobserver~InputEventData#targetRanges
readonly
Editing view ranges corresponding to DOM ranges provided by the web browser (as returned by
InputEvent#getTargetRanges()
).
Methods
-
constructor( view, domEvent, [ additionalData ] )
module:engine/view/observer/inputobserver~InputEventData#constructor
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()
module:engine/view/observer/inputobserver~InputEventData#preventDefault
inherited
Prevents the native's event default action.
-
stopPropagation()
module:engine/view/observer/inputobserver~InputEventData#stopPropagation
inherited
Stops native event propagation.
Every day, we work hard to keep our documentation complete. Have you spotted an outdated information? Is something missing? Please report it via our issue tracker.