How can I indroduce custom HTML tags with attributes?

Hi there,

I need some custom HTML tags with specific attributes. I don't want just to add them to my custom tags, because

  • I want them to be inspected and
  • I need to share them with other developers.

Maybe I should create a plugin for this? Or a library we just can add?

I don't have any plan about both or maybe about better ways. I've tried to find something on the Internet, but I couldn't find anything that could really help me yet. So I'm asking you now. Maybe you have some good hints for me. :-)

1
2 comments

What do these tags look like? Are you using a certain framework?

You need to develop a custom plugin for your HTML extension to get tags recognized. Please check this tutorial: http://www.jetbrains.org/intellij/sdk/docs/tutorials/custom_language_support_tutorial.html.

Here's the open source example of the template language implementation: https://github.com/JetBrains/intellij-plugins/tree/master/handlebars

Note that we have a special forum for questions regarding plugins development - https://intellij-support.jetbrains.com/hc/en-us/community/topics/200366979-IntelliJ-IDEA-Open-API-and-Plugin-Development. Feel free to ask questions there

If developing custom plugin is not an option for you, I can only suggest adding your tags and attributes to exceptions list in inspection

0

Fingers crossed that 2021.3 includes the necessary feature https://youtrack.jetbrains.com/issue/WEB-43382

0

Please sign in to leave a comment.