Background-colors for different languages as javascript

Hi,

is there a possibilty to set the background-color for the different languages? The background of the PHP-code is lightblue (doesn't know, where it is defined but it's ok) and I want lightyellow as the background-color for javascript... It's no problem to set the background-color for vars, labels, parameters and so on - but the "normal" background for areas where is nothing... but nothing??? Any idea?

Thx in progress!

4 comments
Comment actions Permalink

Hi there,

It's not possible.

For PHP it works because the style is applied to the whole <?php tag (which in pure PHP file will be the first in a file) so for user it looks like background color is applied to actual file.

JavaScript has no such special tags .. so it uses default background.

-1
Comment actions Permalink

Thanks for your prompt answer! Will that behaviour be changed in the future? I can't believe that it is a problem, since PHPStorm obviously exactly knows, where Javascript is and where HTML.

0
Comment actions Permalink

Hi,

Could you describe your code a bit more, please?

For example, if we use HTML and JavaScript within PHP files, both JavaScript and HTML are the Template Data Languages that are being injected and that's the matter of native-injected. If we use JavaScript within HTML, it is not possible as Andriy said - we can't be sure where the JS part starts or ends and adding this up would require a lot of resources.

However, you can change the general background of JavaScript structures in Settings/Preferences | Editor | Colors & Fonts | JavaScript. You will need to make a copy of the default color scheme to modify it.

0
Comment actions Permalink

Hmmm... setting the background for all JS-structures gives a "funny" layout - somehow "blotchy", because the background stays white (or whatever background is set).

May be, I'm naive but why not starting at <script> with the alternative background - and end with </script>?

 

0

Please sign in to leave a comment.