title: How can I highlight code with ACE editor?
body: <p>I'd like to syntax highlight more than a dozen small snippets of code and then make them editable with ACE Editor by clicking on them, since I think it would be much faster than setting up the full editor for each. I see there's a <a href="https://github.com/ajaxorg/ace" rel="noreferrer">simple command for setting up an ACE editor</a>:</p>
  
  <pre><code>&lt;div id="editor"&gt;some text&lt;/div&gt;
  &lt;script src="src/ace.js" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt;
  &lt;script&gt;
  window.onload = function() {
      var editor = ace.edit("editor");
  };
  &lt;/script&gt;
  </code></pre>
  
  <p>Is there a simple way to call into the API to just <em>highlight</em> the text without setting up the editor? The ideal API would take in some text and return HTML with tags that could be used for highlighting. I'm aware there are specialized highlighting libraries for JavaScript, but I would like to try using the same highlighter both for text that's being displayed and text that's being edited.</p>