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>
0
4 comments

This is not supported at the moment, please submit feature request at http://youtrack.jetbrains.net/issues/WI.

Regards,
Kirill

0

have a look at:
Settings -> Project Settings -> Language Injections

0

I didn't manage to configure it so it does proper hilighting for that case. Could you help with configuration?

0

Please sign in to leave a comment.