0

I am using a template library that our company has developed.

It is really great, however, we are using a tag:

<g:js> 

// javascript code

</g:js> 

This tag does some stuff but essentially that is javascript code with some objects passed to it at the client.

How can I get intellij to recognize this as javascript code? Right not it is being treated as plain text.

4

1 回答 1

1

你必须注入语言。为此,请将光标移动到标签内(您的 JS 代码所在的位置),然后:

  • Alt+ Enter-> Inject Language-> JavaScript
  • Ctrl+ Shift+A和类型Inject language

之后,您可以使用language injection settings(同样,使用其中一种方法)自定义注入设置。

于 2014-09-07T18:47:41.383 回答