V
V
Vitaly2017-08-14 10:13:08
JavaScript
Vitaly, 2017-08-14 10:13:08

javascript syntax highlighting in phpstorm when registering code via Yii?

Good morning! There is such a question as to enable syntax highlighting in javascript in phpstorm when registering code in yii.
By default, if you register js code in yii, then all code becomes yellow. There is no highlighting, it’s hard to catch errors, and each time transferring all the code to a standard js file and looking there is not very convenient.
Maybe someone knows, maybe there is some kind of plugin for phpstorm for such purposes?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ilya Karavaev, 2017-08-14
@kat-vetal

For such highlighting, you need to use HEREDOC.
For example with js:

$js = <<<JS
alert("Hello");
JS;

M
Maxim Fedorov, 2017-08-14
@Maksclub

Apparently JQuery is not connected in Storm, I made the following decision:
knigaprosoft.ru/javascriptjquery/phpstorm-jquery-api

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question