Search code examples
htmlintellij-ideawebstorm

Language injection of HTML into HTML with IntelliJ (Webstorm)


I'm using the trick of using <script type="x-template"> to make HTML templates within my HTML file that aren't initially parsed into the DOM. However IntelliJ doesn't really recognize that the contents of this tag are HTML, and no code folding is available: enter image description here

Is there any way to get Webstorm to inject HTML as the language into these particular script tags?

I've tried using the language injection settings, but no luck: enter image description here


Solution

  • folding doesn't currently work in templates blocks. Please vote for WEB-12164 to be notified on any progress