title: Set CodeMirror style and addons with a html attribute
body: <p>I have this CodeMirror (<a href="http://codemirror.net/index.html" rel="nofollow">http://codemirror.net/index.html</a>) text area:</p>
  
  <pre><code>&lt;form&gt;&lt;textarea id="code" name="code" codemirror-type='lineNumbers: false, styleActiveLine: true, matchBrackets: true;'&gt;CODE HERE&lt;/textarea&gt;&lt;/form&gt;
  </code></pre>
  
  <p>And as you can see I added the attribute "codemirror-type", I would like to set this style when the script is executed, I tried:</p>
  
  <pre><code>&lt;script&gt;
    var attrs = document.getElementById("code").getAttribute("codemirror-type");
    var editor = CodeMirror.fromTextArea(document.getElementById("code"), attrs);
  &lt;/script&gt;
  </code></pre>
  
  <p>But it does not work I suppose because it is not in the correct format (<a href="http://codemirror.net/doc/manual.html#fromTextArea" rel="nofollow">http://codemirror.net/doc/manual.html#fromTextArea</a>).</p>
  
  <p>I really need to style the code editor from an HTML attribute (or class or addition tag or whatever) <strong>How can I achieve this?</strong></p>