如何将自定义HTML标记添加到Visual Studio并避免波浪线 [英] How to add custom HTML Tags to Visual Studio and Avoid Squiggly Lines

查看:160
本文介绍了如何将自定义HTML标记添加到Visual Studio并避免波浪线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio 2013创建原始HTML页面(即index.html).

I'm using Visual Studio 2013 to create raw HTML pages (i.e. index.html).

在我的HTML中,我正在实现自定义HTML标签.因此,Visual Studio用弯曲的线条在我的自定义标签下划线(由于警告未知元素...").

In my HTML I am implementing custom HTML tags. As such, Visual Studio underlines my custom tags with squiggly lines (due to the warning of "Unknown element ...").

为了摆脱麻烦,我通过Tools > Options > Text Editor > HTML (Web Forms) > Formatting > Tag Specific Options将自定义标签添加到标签特定选项"列表中.但是,弯曲的线条仍然存在.

In hopes to get rid of the squigglies, I added my custom tags to the list of "Tag Specific Options" via Tools > Options > Text Editor > HTML (Web Forms) > Formatting > Tag Specific Options. However, the squiggly lines persist.

是否可以通知VS2013我的自定义HTML标签是有效的(即,防止VS2013用波浪线在我的自定义标签下划线)?

Is there a way to inform VS2013 that my custom HTML tags are valid (i.e. keep VS2013 from underlining my custom tags with squigglies)?

推荐答案

Visual Studio 2013 Update 4删除了.html文件中的验证,但没有删除.aspx文件中的验证.

Visual Studio 2013 Update 4 removes the validation in .html files, but not in .aspx files.

支持自定义元素,聚合物元素和属性

我们不再在那里验证自定义元素的未知属性 在不同的框架中将有许多定制标签.所以会有 不再是未知元素下的花花公子.

We no longer validate unknown attributers for custom elements as there will be many custom made tags in different frameworks. So there will no longer be squiggles under the unknown elements.

-下载 Visual Studio 2013 Update 4 .

仅在HTML编辑器中删除验证,而不在HTML(Web窗体)编辑器中删除.这意味着,默认情况下,.html文件将不具有自定义元素验证,但.aspx页将具有.如果像我一样,您认为这没有道理,请投票支持

Validation is only removed in the HTML editor, not the HTML (Web Forms) editor. This means that, by default, .html files will not have custom element validation, but .aspx pages will. If, like me, you don't think this makes sense, show your support by voting for custom elements in .aspx files.

这篇关于如何将自定义HTML标记添加到Visual Studio并避免波浪线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆