you have to look
<div class="CodeMirror-gutters" style=" /*height: some_pixel*/; "><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 28px;"></div></div>
instead of some_pixel after pressing enter or any keyword it will automatically set the height of the line number,
if you have this problem at startup, you can see how to create first,
There are three common methods,
The simplest is to define your text area and just use this code:
var YourCodeMirror = CodeMirror.fromTextArea(YourDefinedTextArea);
It is best to set values ββusing code:
var yourCodeMirror = CodeMirror(PlaceYouWant, { value: "function(){return 'anything'}", mode: "javascript" });
hope this helps
UPDATE: there is a guide website here: http://codemirror.net/doc/manual.html
source share