title: How do I make syntax highlighting for a specific language with code mirror
body: <p>How do I syntax highlight code for a specific language using codemirror.</p>
  
  <p>my html looks like this:</p>
  
  <pre><code>&lt;head&gt;
      &lt;link rel="stylesheet" type="text/css" href="codemirror/lib/codemirror.css"&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;textarea class="codetextarea"&gt;&lt;/textarea&gt;
  
      &lt;!-- javascript files--&gt;
      &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt; &lt;/script&gt;
      &lt;script type="text/javascript" src="codemirror/lib/codemirror.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="js/default.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>And my javascript:</p>
  
  <pre><code>$(document).ready(function() {
      var code = $(".codetextarea")[0];
      var editor = CodeMirror.fromTextArea(code, {
          lineNumbers : true,
      });
  });
  </code></pre>
  
  <p><code>codemirror</code> is the directory of codemirror API.</p>
  
  <p>I want to do syntax highlighting for C++ but I don't know how to.</p>