I am currently using CodeMirror to edit CODE in text area in browser. If i have more than 20 lines of code, it is adding a vertical scroll bar to right. But i do not need this scroll bar. Instead i need the editor size to grow vertically.
Can anyone help ?
In CodeMirror 3, there is an option to disable the scrollbars : scrollbarStyle: "null"
From the documentation :
scrollbarStyle: string
Chooses a scrollbar implementation. The default is "native", showing native scrollbars. The core library also provides the "null" style, which completely hides the scrollbars. Addons can implement additional scrollbar models.
Combining this with :
height: auto
& viewportMargin: Infinity
(Example: http://codemirror.net/demo/resize.html)lineWrapping: true
And then controlling the height/width of the parent div works well