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 226589 - Support for client-side templates
Summary: Support for client-side templates
Status: NEW
Alias: None
Product: web
Classification: Unclassified
Component: HTML Editor (show other bugs)
Version: 8.1
Hardware: All All
: P2 normal with 9 votes (vote)
Assignee: Milutin Kristofic
Depends on:
Reported: 2013-02-23 17:22 UTC by c69
Modified: 2016-03-29 08:42 UTC (History)
3 users (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description c69 2013-02-23 17:22:59 UTC
jquery/underscore templates, Handlebars, Mustache, maybe some other popular ones with traditional curly-braces based syntax.

Simple syntax coloring and pair matching in <script type="this_teplate_type"> would be enough, imho.
Comment 1 sanicks 2013-03-19 22:00:15 UTC
i solve it installing Apache Server and running
my project using External web server.

then using the Server Side Include
<!--#include virtual="myinclude.html"-->.

but i think that the extention of your index page

must be index.shtml
Comment 2 iikku 2013-04-19 09:48:26 UTC
Currently including a handlebars template on a .jsp page shows an error: "Expected an operand but found error"

Try pasting

<script id="list" type="text/x-handlebars-template">
    {{#if items}}
Comment 3 Vladimir Riha 2013-04-19 09:54:36 UTC
iikku: Please install latest updates (Go to Help|Check For updates), it should be fixed - at least I cannot reproduce it. If not, please file a new issue to javascript - editor and provide some sample to reproduce it. Thanks in advance
Comment 4 iikku 2013-04-19 10:17:04 UTC
You're correct, it's fixed in the latest updates. Syntax highlighting is still missing, anyhow.
Comment 5 Vladimir Riha 2013-04-19 10:19:53 UTC
Yes, definitely. The patch only prevents from getting JavaScript error so there is no error badge.
Comment 6 Salamander 2013-07-02 17:06:40 UTC
Would be fantastic to support this.  Right now, handlebar templates "confuse" the highlighter enough that it starts messing up on a regular javascript block below it.
Comment 7 Christian Lenz 2016-03-21 12:43:53 UTC
Didn't try the plugin yet but maybe this can help:
Comment 8 Christian Lenz 2016-03-29 08:42:20 UTC
I tried the plugin, it brings syntax highlighting to hbs files, hbs files has an icon in the project tree. It is ok for the moment, but the syntax highlighting of the hbs html is missing or broken. everything of the html inside the hbs file has the same color but someone can fix this or so.