Provide edits which inserts the content being dragged and dropped into the document.
The document in which the drop occurred.
The position in the document where the drop occurred.
A DataTransfer object that holds data about what is being dragged and dropped.
A cancellation token.
A DocumentDropEdit or a thenable that resolves to such. The lack of a result can be
signaled by returning undefined
or null
.
Optional
resolveOptional method which fills in the DocumentDropEdit.additionalEdit
before the edit is applied.
This is called once per edit and should be used if generating the complete edit may take a long time. Resolve can only be used to change DocumentDropEdit.additionalEdit.
A cancellation token.
The resolved edit or a thenable that resolves to such. It is OK to return the given
edit
. If no result is returned, the given edit
is used.
Provider which handles dropping of resources into a text editor.
This allows users to drag and drop resources (including resources from external apps) into the editor. While dragging and dropping files, users can hold down
shift
to drop the file into the editor instead of opening it. Requireseditor.dropIntoEditor.enabled
to be on.