My company uses custom tags in our JSPs to wrap JavaScript. I cannot get IntelliJ to treat the content of these tags as JavaScript. Here is a simple example of what our tag looks like.
<ui:script>
//Include javascript here...
alert('Any code in here is treated as JavaScript');
</ui:script>
Any suggestions? I've tried using Language Injections, but I cannot find the right settings.
I just noticed that the problem is more linked to using JSP-specific language within the <ui:script>
tag. A nastier example (notice the ${selectedReportID} tag that's breaking everything):
<ui:script>
new Kamino.DependencyLoader({
source: [
'/static/js/modules/folders/Report.js'
],
onSuccess: function () {
new Kamino.Report({
id: '${selectedReportID}',
element: 'content-reporting-report-list'
});
}
}).load();
</ui:script>
Inject Language
,JavaScript
? – CrazyCoder