parse Javascript in PHP files

In the framework I use all JS code is stored in PHP files.
The problem is that I don't have any JS parsing features like color syntax and code hinting.

Is it possible to force IntelliJ IDEA to render the content as JS?

I have the same problem with PHP in html files.

3 comments

Hi Maarten,

You can configure your language injection settings accordingly to achieve that.

Denis

0

Awesome! Thanks for the tip

Already found a quick hack to trick the editor.

<?php ?>
//<script>


Thx Denis

0

Please sign in to leave a comment.