Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 97327

How to syntax-highlight HTML inside JavaScript strings in VS code?

$
0
0

Is there any Vs Code extension to syntax-highlight HTML inside JavaScript strings?

Specifically I am writing web components

const html = content => `<div><table>
      ${content}</table></div>
`;

class BaseTable extends HTMLElement {
  constructor() {
    super();
  }

  set content(value) {
    const template = document.createElement('template');
    template.innerHTML = style + html(value);

    this.attachShadow({ mode: 'open' });
    this.shadowRoot.appendChild(template.content.cloneNode(true));
  }
}

I want string inside html constant variable to be highlighted


Viewing all articles
Browse latest Browse all 97327

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>