DocumentDropEditProvider

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. Requires editor.dropIntoEditor.enabled to be on.

Online Documentation

Properties

Link copied to clipboard
abstract var resolveDocumentDropEdit: (edit: T, token: CancellationToken) -> ProviderResult<T>?

Optional method which fills in the {@linkcode DocumentDropEdit.additionalEdit} before the edit is applied.

Functions

Link copied to clipboard
abstract fun provideDocumentDropEdits(document: TextDocument, position: Position, dataTransfer: DataTransfer, token: CancellationToken): ProviderResult<JsAny>

Provide edits which inserts the content being dragged and dropped into the document.