解决方法
在CodeMirror 3中,有一个禁用滚动条的选项:scrollbarStyle:“null”
从文档:
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.
@H_301_15@结合这个:
>自动高度:高度:自动高度viewportMargin:Infinity(例如:http://codemirror.net/demo/resize.html)
>换行:lineWrapping:true然后控制父div的高度/宽度效果很好