Add Custom HTML Tags
How can I add custom html tags through the open api? I would like to define some new elements so they do not register as warnings. I know how to do this through the UI, but how can I accomplish this programatically. I'm using the HTMLFileType.INSTANCE as my language instance. I would also like to offer the new elements up as auto completion, but I realize that might be a topic for another post.
请先登录再写评论。
I was able to make the new tags available for completion, but they are still not showing up as valid input. I thought I'd paste the code if anyone else was looking to do the same. I would still like to add the same elements to the custom tags in the unknown tag inspection.
You need to provide implementation of getDescriptor() to make it work. see com.intellij.codeInspection.htmlInspections.HtmlUnknownTagInspectionBase#checkTag