DataTransfer (engine/view)
@ckeditor/ckeditor5-engine/src/view/datatransfer
A facade over the native DataTransfer
object.
Filtering
Properties
-
dropEffect
module:engine/view/datatransfer~DataTransfer#dropEffect
The actual drop effect.
Parameters
value : String
-
effectAllowed
module:engine/view/datatransfer~DataTransfer#effectAllowed
The effect that is allowed for a drag operation.
Parameters
value : String
-
files : Array.<File>
module:engine/view/datatransfer~DataTransfer#files
readonly
The array of files created from the native
DataTransfer#files
orDataTransfer#items
. -
isCanceled
module:engine/view/datatransfer~DataTransfer#isCanceled
Whether the dragging operation was canceled.
-
types
module:engine/view/datatransfer~DataTransfer#types
Returns an array of available native content types.
-
_native : DataTransfer
module:engine/view/datatransfer~DataTransfer#_native
private
The native DataTransfer object.
Methods
-
getData( type ) → String
module:engine/view/datatransfer~DataTransfer#getData
Gets the data from the data transfer by its MIME type.
dataTransfer.getData( 'text/plain' );
Parameters
type : String
The MIME type. E.g.
text/html
ortext/plain
.
Returns
String
-
setData( type, data )
module:engine/view/datatransfer~DataTransfer#setData
Sets the data in the data transfer.
Parameters
type : String
The MIME type. E.g.
text/html
ortext/plain
.data : String
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.