有没有适用于JavaScript字符串中语法高亮HTML的Vs Code扩展程序?
具体来说,我正在编写 Web 组件。
具体来说,我正在编写 Web 组件。
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));
}
}
我想要高亮显示HTML常量变量中的字符串
/* html */\
<h1>Hello world</h1>``。还有 es6-string-* 插件可用于其他语言,如 CSS 和 Markdown。 - ezekg