Questions tagged [vscode-webview]

The Webview API used by extensions in the Visual Studio Code (VS Code) text editor.

The Webview API in VS Code allows extension developers to render rich, arbitrary content using HTML, JavaScript, CSS, and more. Most anything you can do in a web page—modulo some security restrictions—can be done in a VS Code Webview.

5 questions
2
votes
2 answers

Using ES6 modules in VS Code Webview

tl;dr: (how) can I use an ES6 module that imports other modules' exports, in a VS Code extension creating a Webview? Situation I'm trying to update and improve a VS Code extension first written 4 years ago. The extension creates a webview, using…
Phrogz
  • 296,393
  • 112
  • 651
  • 745
1
vote
0 answers

How to make VSCode extension webview's scrollbar always visible or change its color?

I'm developing a vscode extension with webview pages. VSCode's scrollbar appears only on hovering inside the scrollable container (both in editor and webviews). The background of the scroll track is not visible when using dark themes. Is there a way…
0
votes
0 answers

Trying to use VScode web as a online ide in my project with sandpack-client as a live preview

I can able access vscode web with extension.js/extension.ts public API's. but I can't able to send updated code to sandpack client. basically I need to send updated code from vscode web to sanpdpack compiler. sandpack client is separate JS…
0
votes
1 answer

Identifying VS Code Webview instance for context menu command

I am building a VS Code extension that can create multiple webviews; each text editor document can have an associated webview. I want the user to be able to right-click in a webview and execute a command. The command must know which webview instance…
Phrogz
  • 296,393
  • 112
  • 651
  • 745
0
votes
1 answer

VS Code showing 401 trying to load script and CSS assets in a Webview

Summary I'm trying to load an HTML page referencing local JS and CSS files into a Webview. Details below on the code I'm using to construct the URIs (the results don't look correct, but the code I believe matches other examples online). The Webview…
Phrogz
  • 296,393
  • 112
  • 651
  • 745