I'm getting more into using javascript-rendered templates by wrapping them in 'script type="text/html"' tags (in my case within a JSP). The problem is that Eclipse (Indigo) doesn't apply any formatting such as syntax colouring, indentation, suggestions, etc. Is there a way that i can tell Eclipse to treat such content as HTML?
(Edit)
Thanks to folks for the answers, but perhaps i should clarify the question. JSP editing in Eclipse works quite well - just a few nuisances here and there. Different formats within the JSP including JSP, Javascript, HTML, and scriptlets work fine. I just wondered whether there was a configuration somewhere where i could define a <script type="text/html"> section to be rendered as HTML. If the answer is no, so be it.
I know I'm very late but in case someone runs into this with the same problem, like me
I didn't want to use any plugins and I finally came up with a simple workaround for our particular case of using JSP: using the JSTL command 'out'
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:out value=" <script id='emptyTemplate' type='text/template'> " escapeXml="false" />
<div class="emptyTemplateDiv">
Nothing here
</div>
<c:out value=" </script> " escapeXml="false" ></c:out>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With