Is there any way to highlight javascript syntax by eclipse (pdt) in a phtml file? Currently it only shows black text.
Thanks!
Is there any way to highlight javascript syntax by eclipse (pdt) in a phtml file? Currently it only shows black text.
Thanks!
Problem is that phtml files are by default opened in the php editor, and that one doesn't have javascript highlighting.
You could open your phtml file in the html editor or even the javascript editor (right-click the file from the navigator in eclipse, select "open with" and then the editor type you want (obviously you must have the html/js editor installed in eclipse but you most likely will have that). Then, of course, you loose the php highlighting. You can specify the other editor type as default in the settings (if you really want to).
The correct solution though is not to use javascript in your html (or phtml) files (or only the very bare minimum). Put it in a separate .js file, and syntax highlighting will work perfectly!