Add widget to change how content is pasted (#181290)

* Add widget to change how content is pasted

For #30066

This adds a widget that lets you change how content is pasted if there are multiple ways it could be pasted

To do this, I've made the post drop widget generic and reused it for pasting too

* Update types

* More code deduplication
This commit is contained in:
Matt Bierner
2023-05-02 00:40:04 -07:00
committed by GitHub
parent 166e09e198
commit 11ca8d75a1
16 changed files with 261 additions and 171 deletions

View File

@@ -53,7 +53,7 @@ class CopyPasteEditProvider implements vscode.DocumentPasteEditProvider {
return;
}
const pasteEdit = new vscode.DocumentPasteEdit(insert.insertText);
const pasteEdit = new vscode.DocumentPasteEdit(insert.insertText, vscode.l10n.t('Insert image as attachment'));
pasteEdit.additionalEdit = insert.additionalEdit;
return pasteEdit;
}