CodeMirror plugin

If you need to provide template HTML editing functionality to your end users, you can utilize this CodeMirror plugin, which highlights special attributes in HTML code.

Note that the attribute prefix ("mde-") in this demo can be customized. For example. mde-module-container could become your-app-module-container).

Look at the source code of this page to see how the editor is implemented. The orange highlight styles are also defined in the page source in CSS.