title: Can Ace Editor support multiple code editors in one page?
body: <p>I'm looking to implement a web app that features "coding-competition"-styled interface with 2 different code editors in a single screen. One will be read only and the other will be active and would allow the user to edit.</p>
  
  <p>I'm currently using Ace Editor and i find it awesome and simple to use. </p>
  
  <p>However, here's my question. <strong>I seem to be getting an error upon trying to implement 2 different editors in a single page.</strong></p>
  
  <blockquote>
    <p>Uncaught RangeError: Maximum call stack size exceeded</p>
  </blockquote>
  
  <p>Is the variable "editor" in the js script a restricted word or it doesn't matter what variable name is used?</p>
  
  <p>Here's my code in my JS file:</p>
  
  <pre><code>var editorFirst = ace.edit("editorFirst");
  var editorSecond= ace.edit("editorSecond");
  setupEditor();
  
  function setupEditor() {
      editorFirst.setTheme("ace/theme/eclipse");
      editorFirst.getSession().setMode("ace/mode/javascript");
      editorFirst.setShowPrintMargin(false);
      editorFirst.setHighlightActiveLine(true);
      editorFirst.resize();
      editorFirst.setBehavioursEnabled(true);
      editorFirst.getSession().setUseWrapMode(true);
      document.getElementById('editorFirst').style.fontSize = '14px';
  
      editorSecond.setTheme("ace/theme/eclipse");
      editorSecond.getSession().setMode("ace/mode/javascript");
      editorSecond.setShowPrintMargin(false);
      editorSecond.setHighlightActiveLine(true);
      editorSecond.resize();
      editorSecond.setBehavioursEnabled(true);
      editorReducer.getSession().setUseWrapMode(true);
      document.getElementById('editorSecond').style.fontSize = '14px';
  }
  </code></pre>
  
  <p>Here's my code for the html file:</p>
  
  <pre><code>&lt;script src="../assets/js/main.js"&gt;&lt;/script&gt;
  &lt;script src="../assets/js/src/ace.js" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt;
  &lt;div id="editorFirst"&gt;&lt;/div&gt;
  &lt;div id="editorSecond"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Thanks in advance for the replies!</p>