title: CodeMirror, how fold all the code
body: <p>With code mirror, we can fold the code.
  I would like fold all the code with brace. I found this method</p>
  
  <p>How i can fold the entire code, this is my HTML script :</p>
  
  <pre><code>window.onload = function() {
    var te = document.getElementById("code");
    var sc = document.getElementById("script");
  
    var te_clike = document.getElementById("code-clike");
  
    window.editor_clike = CodeMirror.fromTextArea(te_clike, {
      mode: "text/x-csharp",
      lineNumbers: true,
      extraKeys: {"Ctrl-Q": function(cm){ cm.foldCode(cm.getCursor()); }},
      foldGutter: true,
      readOnly: true,
      gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"]
    });
  
  };
  </code></pre>
  
  <p>Thanks you for your help...</p>