skip to Main Content

I am developing an extension.
The extension has a two parameters for the user to input data via the Settings.

Is it possible to set the textbox to a textarea (like in html) and have a reset to default button?

I created these two fields. But I wish to set textareas instead of textboxes and a reset button on each one. I don’t even know if it’s possible.

What the package.json looks like

2

Answers


  1. I’m sorry to say, but these are not possible. There is no textarea kind of setting, nor the possibility to customize the inputs with a new button.

    There is however an open issue requesting the same textarea you asked for (https://github.com/microsoft/vscode/issues/183025). I suggest you to subscribe/upvote to follow it future.

    And about the reset button you asked, in fact, it already exists. Simply click over the setting and you will see an engine icon. Click it and a Reset Setting item is available.

    reset setting

    Hope this helps

    Login or Signup to reply.
  2. You can get multiline setting text inputs. See https://code.visualstudio.com/updates/v1_59#_multiline-string-settings

    To add support for a multiline string setting in the Settings editor, add "editPresentation": "multilineText" as a key-value pair to the string setting. Changing a string setting to be multiline will cause the Settings editor to render the setting value in a multiline text area instead of a single-line input box.

    As for a reset button, it already exists: To reset settings, click the gear icon in the settings UI for the setting, and click the "Reset Setting" action button.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search