PHP Inside JS/HTML/Etc. Files

A new existing project I'm working on pipes all of their JS, HTML, etc. files through PHP for parsing. Thus, there's PHP inside of these files. Is there an easy way to get PhpStorm to recognize the PHP inside these files without reassociating the file types? Reassociating HTML is fine, but reassociating JS files causes only the PHP to be recognized and not the JS.

My guess is that the answer is I'm stuck, but I hope not. Thanks for the help.

1 comment
Comment actions Permalink

Hi Robert,

You have to re-associate file type. After that:

  1. Settings | Template Data Languages
  2. Find the file(s) (or whole folder) and assign JS/CSS/etc as required.

That's the only way you can currently do it in PhpStorm


Please sign in to leave a comment.