Autoresize Demo

x
 
1
.CodeMirror {
2
  border: 1px solid #eee;
3
  height: auto;
4
}
5

By setting an editor's height style to auto and giving the viewportMargin a value of Infinity, CodeMirror can be made to automatically resize to fit its content.