Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>leet-htmlNew to Visual Studio Code? Get it now.
leet-html

leet-html

Eldar Gerfanov

|
15,577 installs
| (7) | Free
Syntax highlighting and IntelliSense for html inside of JavaScript and TypeScript literal template strings
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

leet-html README

Display literal templates as HTML, Unlike other plugins NO /*html*/ prefix is required!

Features

Works like this:

Usage

The leet-html extension adds highlighting and IntelliSense for template strings in JavaScript and TypeScript. It works out of the box and has no dependencies.

Acceptable Rules

The opening ` character must be preceeded by either one of those operators: return, = , += , + , ? , :

var a = `<div></div>` + `<br>`;
a += `<div></div>` + `<br>`;

return `<div></div>` + `<br>`;

return (true ? `<div></div>` : `<span></span>` );

What does not work

The opening ` character can not be the first on the line and can not be enclosed by the folowing operators: (), []

So the following variants will not be highlighted:

(`<div></div>');

(`<div>
</div>');

var a = 
`<div></div>` + `<br>`;

a += 
`<div></div>` + `<br>`;

Solution for unsupported cases

Use the /*html*/ prefix before the template to turn on highlighting:

(/*html*/`<div></div>');

Other links

  • Publishing VSCode extensions:

    https://code.visualstudio.com/api/working-with-extensions/publishing-extension

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft