I am storing a number of HTML blocks inside a CMS for reasons of easier maintenance. They are represented by <textarea>
s.
Does anybody know a JavaScript Widget of some sort that can do syntax highlighting for HTML within a textarea
or similar, while still staying a plain text editor (no WYSIWYG or advanced functions)?
It's not possible to achieve the required level of control over presentation in a regular textarea.
If you're OK with that, try CodeMirror or Ace or Monaco (used in MS VSCode).
From the duplicate thread - an obligatory wikipedia link: http://en.wikipedia.org/wiki/Comparison_of_JavaScript-based_source_code_editors