cbdeveloper
cbdeveloper

Reputation: 31485

CodeSandbox editor has stopped auto completing the corresponding JSX closing tags?

CodeSandbox editor used to auto generate the corresponding close tag for the current tag.

For example:

<div> // THEN IT WOULD AUTO GENERATE THE </div> TAG

enter image description here

But don't know exactly when, it stopped doing that, and I have to write it manually. Is there a way to enable this autocomplete again?

Upvotes: 7

Views: 9498

Answers (3)

tnrich
tnrich

Reputation: 8610

Just posting an updated answer since the UI has changed for codesandbox. I believe this answer is now slightly better:

  • Press cmd+, (ctrl+, on a windows) with the editor focused (this opens the vscode settings)
  • You should see a settings page like so: image of vscode settings
  • In the Search Settings box type Javascript Autoclosing Tags
  • Toggle the checkbox on

Upvotes: 3

Marcos
Marcos

Reputation: 866

In my case the auto completion works if a change the extension of the file to .jsx and if I start typing the tag without the <.

Upvotes: 2

Luis
Luis

Reputation: 246

In the codesandbox.io go to:

File -> Preferences -> Settings

In the Search Settings box type Javascript Autoclosing Tags.

Enable that feature by checking the Checkbox.

Upvotes: 23

Related Questions