Your comments

Use case is for editing code "Much like editing liquid templates for portals"
Ace allows adding custom logic for highlighting and auto complete etc. and also theming such as dark more. 

Currently have implemented this for a client though no public source code for community I can point you to.

Personal use case is for storing content like JSON Schema or Scriban template code for some data driven custom dialog processes. Such as a dialog that uses a JSON Schema to render a dynamic form to capture JSON (also a PCF control)  entered by user as run time which is then sent to function app with a Scriban template which utilizes captured data as an input returning parsed text which could be JSON, CSV, HTML etc. (We compose HTML to emails or PDF's for documents) also publish html as static web pages etc.