DataTransfer (clipboard)
@ckeditor/ckeditor5-clipboard/src/datatransfer
A facade over the native DataTransfer
object.
Filtering
Properties
-
dropEffect
module:clipboard/datatransfer~DataTransfer#dropEffect
-
effectAllowed
module:clipboard/datatransfer~DataTransfer#effectAllowed
-
files : Array.<File>
module:clipboard/datatransfer~DataTransfer#files
readonly
The array of files created from the native
DataTransfer#files
orDataTransfer#items
. -
isCanceled
module:clipboard/datatransfer~DataTransfer#isCanceled
Whether the dragging operation was canceled.
-
types
module:clipboard/datatransfer~DataTransfer#types
Returns an array of available native content types.
-
_native : DataTransfer
module:clipboard/datatransfer~DataTransfer#_native
private
The native DataTransfer object.
Methods
-
getData( type ) → String
module:clipboard/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:clipboard/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.