This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Please add syntax highlighting and code completion for HTML inside a string in JS files | ||
---|---|---|---|
Product: | javascript | Reporter: | Christian Lenz <chrizzly> |
Component: | Editor | Assignee: | Petr Pisl <ppisl> |
Status: | CLOSED INVALID | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 8.1 | ||
Hardware: | PC | ||
OS: | Other | ||
Issue Type: | ENHANCEMENT | Exception Reporter: |
Description
Christian Lenz
2016-08-08 15:20:04 UTC
I remember the discussion whether provide html syntax coloring in strings for other languages. The result was not provide such syntax coloring. The main reason was to recognize the string at first view and to be compatible with java doc, where the html tags are not also colored. I'm OK with providing code completion in these situations. But it will not be connected with the jsx support. It will be provided in every string in js file. Of course it is not connected or related to the JSX support, I only wanted to say, if it's possible to bring HTML syntax highlighting and code completion support to JS files, which supports React, than it should also be possible to bring the same for strings, because often you have cases where you have languages in strings, in other languages. Like SQL in Java, SQL in PHP where those should syntax highlighted too and should support code completion too, because this reduces the amount of misstyping smth. Strings are not really helpful in most of the cases. If we can have HTML syntax highlighting and code completion support in strings, mostly for js, php and don't know for java but I think there exists such cases too this will increase productivity and reduce errors of misstyping. I know for PHP and for java I have to create separate tickets but these cases are real and exists. For JS it exists for inline HTML in JS files to create elements and assign it to innerHTML for example or for templates in Angular and Angular2. I am agree with Chris. The syntax highlighting in strings would be great. In PHPStrom it is already implemented and works great. SQL in JS is also needed, because of node, we can have inline SQL inside js files: https://github.com/mysqljs/mysql I can create a new ticket for this enhancement, if you want. Now there is a plugin to bring exactly this behaviour into Visual Studio Code: https://marketplace.visualstudio.com/items?itemName=natewallace.angular2-inline the thing is more and more frameworks can work with inline templates. And JS can handle this from the beginning. So this is really needed and a must have to bring both together. I will close it, because it will handled now at the JIRA board: https://issues.apache.org/jira/browse/NETBEANS-1649. Please discuss it there for further information. |