Highlight html syntax inside string?

前端 未结 2 966
鱼传尺愫
鱼传尺愫 2021-01-18 00:24

Is there a way (plugin, option, or tip and trick) to highlight html syntax in a js string?

My document is .JS file, in which I use strings containing html code. Is i

相关标签:
2条回答
  • 2021-01-18 00:38

    OMG , after 3 hour research i find !!!!!

    https://marketplace.visualstudio.com/items?itemName=Tobermory.es6-string-html

    befor

    after

    enjoys

    0 讨论(0)
  • 2021-01-18 00:50

    The extension that you suggested requires that you prefix your strings with a comment like /*html*/ or html. I'm working with Angular, and I didn't want to go through all my templates to prefix them, so I found this extension that does it automatically without prefixes:

    https://marketplace.visualstudio.com/items?itemName=natewallace.angular2-inline

    It is included in the Angular Essentials package by John Papa:

    https://marketplace.visualstudio.com/items?itemName=johnpapa.angular-essentials

    0 讨论(0)
提交回复
热议问题