When you apply line numbers to code mirror, they only show if the line actually has content. See this example fiddle. It only shows line numbers 1-5.
I'm wondering if there is a configuration to instead show line numbers for the entire height? (instead of blank entries)?
I've been looking through the documentation but I can't seem to find anything on this. Any suggestions?
This is my basic configuration:
var myCodeMirror = CodeMirror(document.body, {
value: "function myScript()\n{\n\treturn 100;\n}\n",
mode: "javascript",
lineNumbers: true
});
Ugly workaround: just append \n until it starts scrolling (check scrollTop and scrollHeight).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With