开发者

Anyway to make Visual Studio ignore the script tag and assume anything in a script tag is html?

I have a lot of templates that are enclosed within script tags. They are pure html, but Visual Studio grays them out. I don't have any in-line Javascript so if Visual Studio simply ignored the script tag and treated the contents inside as it would a normal html document would be really nice. I've grown accustomed to CSS class intellisense and nice code formatting.

This is a long shot, anyway this is possible? Right now I'm marking up my HTML then putting it within the script tag, but w开发者_StackOverflow社区as hoping for a better solution.


You can insert a space after the opening bracket of the opening SCRIPT tag to enable HTML IDE support and when your done, just remove the space.

< script>
 ^leave space
 <div>HTML is supported</div>
</script>

<script>
 ^no space
 <div>HTML is NOT supported here</div>
</script>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜