May help someone.
<textarea class="form-control" id="exampleTextarea"></textarea>
.
var config, editor; config = { lineNumbers: true, mode: "text/javascript", lineWrapping: true, htmlMode: true, matchClosing: true, indentWithTabs: true, readOnly: true }; editor = CodeMirror.fromTextArea(document.getElementById("exampleTextarea"), config); editor.setSize(900,"100%");
source share