Optional method invoked after the user copies text in a file.
During prepareDocumentPaste, an extension can compute metadata that is attached to a DataTransfer and is passed back to the provider in provideDocumentPasteEdits.
Document where the copy took place.
Ranges being copied in the document
.
The data transfer associated with the copy. You can store additional values on this for later use in provideDocumentPasteEdits.
A cancellation token.
Invoked before the user pastes into a document.
In this method, extensions can return a workspace edit that replaces the standard pasting behavior.
Document being pasted into
Currently selected ranges in the document.
The data transfer associated with the paste.
A cancellation token.
Optional workspace edit that applies the paste. Return undefined to use standard pasting.
Provider invoked when the user copies and pastes code.