Adding attributes(on the fly) to html

Hi.
I would like to add attributes to some html tags so that those attributes aren't parsed as invalid attributes. I searched and search but could only find help for implementing auto-completion, but this i got working just fine.

Any ideas ?

4 comments

Ok, now i'm feeling stupid. Turns out it wasn't the parser that was showing the error, it was the "Custom html attributes" inspection that was doing it.

Sorry....

0

Hi!

I'm working on a plugin for developing webapplications. The plugin implements new modul types to support usage of different webapplication frameworks. As the 6.0 Idea supports project scope custom html attributes, I want to add some depending on modul types in the project.

For example:
If the project contains a "wicket modul" I want to add "wicket:id" to the custom html attributes. "jwcid" for "tapestry modules" and so on.

I've seen other plugin developers extending the parsing mechanism of xml files, but a simple way to add custom html attributes via plugin would be just fine.

Is there a way to do that?

Thanks in advance!

0

Seems, I found the page related to the problem:
http://www.jetbrains.net/jira/browse/IDEADEV-2335

Code for registering own XmlNSDescriptor (extends com.intellij.xml.impl.schema.XmlNSDescriptorImpl):

0

There is HTML inspection that reports about incorrect tags and attributes (Settings / Errors / HTML Inspections / HTML tags and attributes convention).

If the attribute is added to the custom attributes list of this inspection then IDE don't report that the attribute is incorrect. The code that modifies the custom attributes list:


The question: where is the best place to execute this code? In the file opened listener, on project startup, or another place?

0

Please sign in to leave a comment.