0

My javascript file myChart.js displaying as a text file and not as a js File. What should I do to resolve it?

CAn you please refer image link

2 Answers2

2

Check if JavaScript syntax highlighting is enabled in Eclipse/STS as suggested here.

Alternatively, you can add marketplace plugins like Code Mix.

Might need to restart to get the changes reflected.

Prathap Reddy
  • 1,688
  • 2
  • 6
  • 18
  • hey, that was not eclipse. It is spring tool suite 4 for developing spring applications.How to enable javascript in that? – Prasanna_smu Jul 23 '20 at 10:06
  • Options should be almost similar. STS is a flavour in top of Eclipse – Prathap Reddy Jul 23 '20 at 10:08
  • I have the same problem. In Syntax Coloring of: Web > HTML Files >Client-side JavaScript > Editor > Syntax Enable entry is disabled and not selected. How can I enable it? – sunrelax Oct 02 '20 at 08:12
  • @sunrelax, [this answer](https://stackoverflow.com/questions/12269560/javascript-editor-plugin-for-eclipse) might help you. – Prathap Reddy Oct 02 '20 at 09:20
1

We can install CodeMix plugin and from Eclipse Marketplace(Help -> Eclipse Marketplace) and it solves the problem.

batman
  • 53
  • 8