allow copying cell output images from context menu

This commit is contained in:
Aaron Munger
2023-08-18 10:43:43 -07:00
parent e40344eba7
commit bd60cc529c
5 changed files with 182 additions and 140 deletions

View File

@@ -37,6 +37,7 @@ function renderImage(outputInfo: OutputItem, element: HTMLElement): IDisposable
if (alt) {
image.alt = alt;
}
image.setAttribute('data-vscode-context', JSON.stringify({ webviewSection: 'image', outputId: outputInfo.id, 'preventDefaultContextMenuItems': true }));
const display = document.createElement('div');
display.classList.add('display');
display.appendChild(image);