Make PHPStorm hilight underscore.js templates
How can i make PHPstorm
1. Treat
<script type="text/template" id="tMember">
contents as HTML
2. Treat
<% if(!empty(imageURL)) { %> <% } %>
contents as JAVASCRIPT
Custom code snippet:
<script type="text/template" id="tMember">
<div >
<div <% if(!empty(imageURL)) { %> <% } %> >
<span ></span>
</div>
<div >
<%= name %>
</div>
</div>
</script>
Please sign in to leave a comment.
This is not supported at the moment, please submit feature request at http://youtrack.jetbrains.net/issues/WI.
Regards,
Kirill
have a look at:
Settings -> Project Settings -> Language Injections
I didn't manage to configure it so it does proper hilighting for that case. Could you help with configuration?
http://youtrack.jetbrains.com/issue/WI-13569