DataTransfer (clipboard)
@ckeditor/ckeditor5-clipboard/src/datatransfer
class
Facade over the native DataTransfer
object.
Filtering
Properties
-
files : Array.<File>
readonly
The array of files created from the native
DataTransfer#files
orDataTransfer#items
. -
Returns an array of available native content types.
-
_native : DataTransfer
private
The native DataTransfer object.
Methods
-
getData( type ) → String
Gets 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 )
Sets data in the data transfer.
Parameters
type : String
The mime type. E.g.
text/html
ortext/plain
.data : String