title: ace editor tutorial with save function
body: <p>I need to add save function to my <a href="https://ace.c9.io/#nav=about" rel="nofollow">ACE editor</a> tutorial. Here is my sample code. Please help me to add save event to my sample code. please do not down vote me.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var editor = ace.edit("editor");
  editor.getSession().setUseWorker(false);
  editor.setTheme("ace/theme/monokai");
  editor.getSession().setMode("ace/mode/javascript");</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>#editor { 
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width :600px;
    height: 600px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt;
  &lt;div id="editor"&gt;
    function foo(items) {
    var x = "All this is syntax highlighted";
    return x;
    }
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>