InputEventData (engine/view/observer)
@ckeditor/ckeditor5-engine/src/view/observer/inputobserver
The value of the ViewDocumentInputEvent event.
Filtering
Properties
-
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
dataand sometimes in thedataTransferproperty.- If
InputEvent#datawas set, this property reflects its value. - If
InputEvent#datais unavailable, this property contains the'text/plain'data fromdataTransfer. - If the event (input type)
provides no data whatsoever, this property is
null.
-
readonly
dataTransfer : DataTransfermodule:engine/view/observer/inputobserver~InputEventData#dataTransferThe data transfer instance of the input event. Corresponds to native
InputEvent#dataTransfer.The value is
nullwhen nodataTransferwas passed along with the input event. -
readonly inherited
document : Documentmodule:engine/view/observer/inputobserver~InputEventData#documentThe instance of the document.
-
readonly inherited
domEvent : InputEventmodule:engine/view/observer/inputobserver~InputEventData#domEventThe DOM event.
-
readonly inherited
domTarget : HTMLElementmodule:engine/view/observer/inputobserver~InputEventData#domTargetThe DOM target.
-
The type of the input event (e.g. "insertText" or "deleteWordBackward"). Corresponds to native
InputEvent#inputType. -
A flag indicating that the
beforeinputevent was fired during composition.Corresponds to the event-compositionstart, event-compositionupdate, and event-compositionend trio.
-
The tree view element representing the target.
-
readonly
targetRanges : Array<Range>module:engine/view/observer/inputobserver~InputEventData#targetRangesEditing view ranges corresponding to DOM ranges provided by the web browser (as returned by
InputEvent#getTargetRanges()). -
Instance of the view controller.
Methods
-
inherited
preventDefault() → voidmodule:engine/view/observer/inputobserver~InputEventData#preventDefault -
inherited
stopPropagation() → voidmodule:engine/view/observer/inputobserver~InputEventData#stopPropagation
Every day, we work hard to keep our documentation complete. Have you spotted outdated information? Is something missing? Please report it via our issue tracker.
With the release of version 42.0.0, we have rewritten much of our documentation to reflect the new import paths and features. We appreciate your feedback to help us ensure its accuracy and completeness.