title: CodeMirror using jQuery .keyup on editor textarea
body: <p>I want to getValue of Codemirror editor on keyup but it did not work.
  Here's <a href="http://jsfiddle.net/p5GJL/" rel="nofollow">the fiddle</a></p>
  
  <pre><code>var mixedMode = {
          name: "htmlmixed",
          scriptTypes: [{matches: /\/x-handlebars-template|\/x-mustache/i,
                         mode: null},
                        {matches: /(text|application)\/(x-)?vb(a|script)/i,
                         mode: "vbscript"}]
        };
        var editor = CodeMirror.fromTextArea(document.getElementById("HTML"), {mode: mixedMode,lineNumbers: true  });
  
  $(document).ready(function(){
    $("#HTML").keyup(function(){
      html = editor.getValue();
      alert(html);
      });
  }); 
  </code></pre>