Class

DataTransfer (clipboard)

@ckeditor/ckeditor5-clipboard/src/datatransfer

class

A facade over the native DataTransfer object.

Filtering

Properties

  • dropEffect

    The actual drop effect.

    Parameters

    value : String
  • effectAllowed

    The effect that is allowed for a drag operation.

    Parameters

    value : String
  • files : Array.<File>

    readonly

    The array of files created from the native DataTransfer#files or DataTransfer#items.

  • isCanceled

    Whether the dragging operation was canceled.

  • types

    Returns an array of available native content types.

  • _native : DataTransfer

    private

    The native DataTransfer object.

Methods

  • getData( type ) → String

    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 or text/plain.

    Returns

    String
  • setData( type, data )

    Sets the data in the data transfer.

    Parameters

    type : String

    The MIME type. E.g. text/html or text/plain.

    data : String