title: How to highlight syntax in codeMirror
body: <p>I am trying to use <a href="http://codemirror.net/" rel="noreferrer">codemirror</a> to my website a versatile text editor implemented in JavaScript for the browser. But the syntax highlight is not working. codeMirror Documentation didn't help me much. here is my code.</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;meta charset="utf-8"&gt;
  &lt;title&gt;Code Mirror&lt;/title&gt;
  &lt;link rel="stylesheet" type="text/css" href="codemirror.css"&gt;
  &lt;script type="text/javascript" src="codemirror.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  
      &lt;textarea id='demotext'&gt;
  
      function foo() {
          for(i = 0, i &lt; 10, i++)
          console.log(i);
      }
  
      &lt;/textarea&gt;
  
  &lt;script type="text/javascript"&gt;
  
      var editor = CodeMirror.fromTextArea(document.getElementById("demotext"), {
            lineNumbers: true,
            mode: "javascript"
      });
  
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>my code syntax inside textarea is not highlighting. 
  <a href="http://i.stack.imgur.com/MPgy7.jpg" rel="noreferrer">CodeMirror syntax highlighting is not working here.</a></p>