I’ve been trying to get the scriptStart() method to work but there is one little quirck with it.
You see, whenever I use this (of course, along with scriptEnd()), what happens is I need to remove my <script> tags from my template file, which causes syntax highlighting to break.
So my question is, is there any way to get around this without fiddling around with the IDE?
There are a few scripts that I want to use this on (so it’ll always be slam dunked in the same area of the page instead of slab-dab in the middle of it).
One of those scripts basically sends an AJAX-request to an API to get the changelog for a certain project.
I could in theory add this to one global JavaScript file but this would make a huge mess in the long run (and adds additional JavaScript for something people might never even use)…
I think it would be nice to have a way to disable the wrapping in a script tag…
My point is that those functions build an block of output, and then at the end wrap the contents of that block in script tags. You seem to want the block of output rendered as-is, without the script tags. Is that the entirety of it? If so, then the only thing of value to you that the functions are providing is building a block of output, and there are other functions that do that just as well, without the part you don’t want.
well, the thing is this:
If I use the scriptStart and scriptEnd methods, I break the syntax highlighting in my editor, which makes writing code more difficult (in case I need to update something for example).
Instead of this: