dropMimeTypes property
The mime types that the {@link TreeDragAndDropController.handleDrophandleDrop
} method of this DragAndDropController
supports.
This could be well-defined, existing, mime types, and also mime types defined by the extension.
To support drops from trees, you will need to add the mime type of that tree.
This includes drops from within the same tree.
The mime type of a tree is recommended to be of the format application/vnd.code.tree.<treeidlowercase>
.
Use the special files
mime type to support all types of dropped files {@link DataTransferFilefiles}, regardless of the file's actual mime type.
To learn the mime type of a dragged item:
- Set up your
DragAndDropController
- Use the Developer: Set Log Level... command to set the level to "Debug"
- Open the developer tools and drag the item with unknown mime type over your tree. The mime types will be logged to the developer console
Note that mime types that cannot be sent to the extension will be omitted.
Implementation
_i2.List<_i2.String> get dropMimeTypes => (_i5.getProperty(
this,
'dropMimeTypes',
) as _i2.List)
.cast();