I was curious if there was a way to get highlighting/indentation for any JavaScript that's inside of HTML5 tags? I don't frequently use JavaScript but for a class I'm in we're working with it. I assume it would be a matter of creating a JavaScript minor-mode and then hooking that into the HTML5 mode?
1 Answer
There's a major mode that can highlight nested languages for web along with server-side scripting languages like PHP and template languages. It's better than html-mode for HTML editing as well, since it understands indentation better and avoids doing silly things like indenting contents of <pre> tags.
It's called web-mode.
Here's a link to it's page, and here's the repo with it.