Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vscode extension how to display a form

I wish to create a VSCode extension with an entry form on it - some way of input. So far I have only seen document processing or output for an extension.

How can you display a form of input fields in a vscode extension?

like image 861
user30803 Avatar asked Apr 18 '16 22:04

user30803


People also ask

How do you display VS Code output?

To display the Output window whenever you build a project, in the Options dialog box, on the Projects and Solutions > General page, select Show Output window when build starts.

How do I display the VS Code extension bar?

Go to VSCode settings ( CTRL+, or CMD+, ) and search for shortcut menu bar . Toggle buttons from there.

How do I show VS Code preview?

Tip: You can also right-click on the editor Tab and select Open Preview (Ctrl+Shift+V) or use the Command Palette (Ctrl+Shift+P) to run the Markdown: Open Preview to the Side command (Ctrl+K V).

How do I add a template to VS Code?

In VSCode, open a folder that will contain your new project. Use the Command Palette to execute the command "Project: Create Project From Template". A list of available templates should appear. Select the desired template.


1 Answers

How much data do they need to enter? If it's not much, you should be able to handle it with a series of InputBoxes

From https://code.visualstudio.com/docs/extensionAPI/vscode-api

showInputBox(options?: InputBoxOptions): Thenable<string>

Opens an input box to ask the user for input.

The returned value will be undefined if the input box was canceled (e.g. pressing ESC). Otherwise the returned value will be the string typed by the user or an empty string if the user did not type anything but dismissed the input box with OK.

Parameter   Description
options?: InputBoxOptions   
Configures the behavior of the input box.

Returns Description
Thenable<string>    
A promise that resolves to a string the user provided or to undefined in case of dismissal.
like image 189
Tobiah Zarlez Avatar answered Oct 19 '22 04:10

Tobiah Zarlez