title: CodeMirror auto Line-Break
body: <p>I'm trying to make it so when you go over a certain amount of text and it reaches the max-width of the codemirror it will bring you down to a new line instead of just making a scrollbar and making you go out further.</p>
  
  <p>Checkout the example!
  <a href="http://codeeplus.net/test.php" rel="noreferrer">http://codeeplus.net/test.php</a></p>
  
  <p>CSS:</p>
  
  <pre><code>&lt;style&gt;
    .CodeMirror { height: 400px; width: 500px; border: 1px solid #ddd; }
    .CodeMirror-scroll { max-height: 400px; width:500px; }
    .CodeMirror pre { display:inline-block; padding-left: 7px; line-height: 1.25; }
    #drawing { border: 1px solid #555555; float:left; display:inline-block; width:480px; height: 380px; }
  &lt;/style&gt;
  </code></pre>
  
  <p>Textarea:</p>
  
  <pre><code>&lt;textarea align="left" style="display:inline-block;" id=demotext name="textarea"&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>  &lt;script&gt;
      var editor = CodeMirror.fromTextArea(document.getElementById("demotext"), {
        lineNumbers: true,
        lineWrapping: true,
        mode: "text/html",
        matchBrackets: true
      });
    &lt;/script&gt;
  </code></pre>