How to change textarea, height or number of lines?


I need to extend the textarea height, or increase number of lines within.
Anyone knows how to do that?

Also, I need to change the font size within the textarea, any help?

Use CSS.

.CodeMirror {
  font-family: "Ubuntu Mono";
  line-height: 1.2em;
  height: 3.6em;

If you do this on a running editor (for example by changing DOM style objects), you’ll have to call the editor’s refresh method afterwards so that it can adjust to its new style.

1 Like

Thank you! It works. It surprises me that, no API supports me to do that.

Thanks a lot. It does works. I have spent too much time on this problem.