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.

Bug 238949 - Netbeans not recognizing various templates in <script> tag as HTML
Summary: Netbeans not recognizing various templates in <script> tag as HTML
Status: NEW
Alias: None
Product: web
Classification: Unclassified
Component: HTML Editor (show other bugs)
Version: 8.1
Hardware: All All
: P2 normal with 23 votes (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
: 248958 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-11-28 23:54 UTC by jlondono
Modified: 2017-02-07 09:57 UTC (History)
8 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Look at this mess! (39.59 KB, image/png)
2015-03-13 13:11 UTC, elennaro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jlondono 2013-11-28 23:54:37 UTC
sample:

 <script id="tmplTablaCuenta" type="text/x-jsrender">
            <div id="loading" style="text-align:center;display:none">
            <thead>
            <tr>
            <th> </th>
            <th>Numero</th>
            <th>Fecha</th>
            <th>Prefijo</th>
            <th>Cliente</th>
            <th>Valor</th>
            </tr>
            </thead>
            </table>
            </div>
            <div id="error"></div>
        </script>
Comment 1 Vladimir Riha 2013-12-02 09:08:29 UTC
Reproducible, but I think this is more of a enhancement. It would work if type is set to text/html but I guess that's not possible with used framework? From "text/x-jsrender" NetBeans can't know it is HTML
Comment 2 wfsaxton 2014-08-12 19:22:26 UTC
I'm having the same issue with type="text/x-handlebars".

It would be nice to configure how the editor handles various <script> tags.  Like the original requester, I too would like HTML formatting within these tags.  

I'm guessing this will become more and more popular as client-side JS frameworks are in use.
Comment 3 Vladimir Riha 2014-11-28 10:41:27 UTC
*** Bug 248958 has been marked as a duplicate of this bug. ***
Comment 4 elennaro 2014-11-28 13:16:04 UTC
type="text/x-jsrender" - html
type="text/x-handlebars" - ???
type="text/ng-template" - html
Comment 5 Vladimir Riha 2014-11-28 13:27:21 UTC
Probably also 

text/x-handlebars-template
Comment 6 elennaro 2015-02-28 12:00:03 UTC
This is SO MUCH needed feature for a good angularjs/ionic/javascript/frontend programmer!

we have next types:

text/html
text/template
text/x-jsrender
text/ng-template
text/x-handlebars
text/x-handlebars-template

that should be treated as html (and templating syntax inside) in a script tags.

And it's widely used by all front-end developers.
Comment 7 elennaro 2015-03-13 13:11:27 UTC
Created attachment 152602 [details]
Look at this mess!

Please fix this! We suffer much!
Need formatting and cc in <script type="text/ng-template"> So much!
Please, please, please!
Comment 8 Vladimir Riha 2015-03-13 13:25:11 UTC
Please, do not change the version meta data. Thank you
Comment 9 elennaro 2015-03-13 20:27:04 UTC
Ok. Sorry.
Comment 10 Milutin Kristofic 2015-06-29 12:07:17 UTC
I am sorry, this is really enhencement. There is a lot of work for each type to be recognizable.
Comment 11 dalelarsen 2016-03-23 22:04:02 UTC
Netbeans can't claim it has angular support if it can't even correctly format templates... this is really needed. Does anyone know any work-a-rounds?
Comment 12 Sergiu.Toporjinschi 2016-04-23 14:00:45 UTC
I need that text/ng-template format tooo
Comment 13 Christian Lenz 2016-04-23 15:59:28 UTC
So please vote for it. Bugzilla for netbeans has a voting system. More votes, means change to a higher priority. But a comment is not really a vote.
Comment 14 bouks 2016-06-02 22:14:34 UTC
This is extremely annoying.