There are functions captureStart() and captureEnd() in Zend_View_Helper_HeadScript. This functions add script tag to the captured text.
This means that I am not allowed to user <script> tag in my view source file. So my editor is not recognizing that it is and JavaScript code, thinks it is HTML and does not apply syntax highlighting.
I would like to write code:
Code:
<?php $this->headScript()->captureStart() ?>
<script>
dojox.off.ui.appName = "Example Application";
....
<?php $this->headScript()->captureEnd() ?>
</script>
But unfortunately it will be changed to:
Code:
<script type="text/javascript">
//<![CDATA[
<script>
dojox.off.ui.appName = "Example Application";
....
</script>
//]]>
</script>
Is there a work around ?
Would it not be possible to add parameter to captureStart which would delete first and last line of captured text on request ?