Knockout.js syntax highlighting in HTML data-bind attributes?
So far I haven't been able to find any support for Knockout.js in IDEA, except including it as a library. HTML files have highlighting and completion for JavaScript in onclick attributes for instance. I would like to have the same for data-bind attributes, including some variables specific to Knockout ($data, $parent and other context variables).
Writing a plugin for this didn't seem too complicated, but I got lost in the vast jungle of Java-classes. Do I have to create a new custom language?
Support for virtual elements (ko comments) would also be nice, the syntax is similar to the data-bind attributes.
请先登录再写评论。
Great idea!
This is old great solution with Language injection https://studgeek.com/2010/08/16/intellijidea-webstorm-knockout-data-bind-attributes/ But how to inject javascript to xml-comment <!-- ko ... -->