【问题标题】:How do I make Ace editor resize its height accordingly to the number of rows?如何让 Ace 编辑器根据行数调整其高度?
【发布时间】:2015-09-05 09:54:45
【问题描述】:

如何将 Ace 配置为具有高度以便所有行始终可见,而不是垂直滚动条?

基本上相当于:

document.querySelector("textarea").oninput = function(){
    this.rows = this.value.split(/\n/g).length;
};

http://jsfiddle.net/obobjrf5/

我该怎么做?提前谢谢你。

【问题讨论】:

    标签: javascript cloud9-ide ace-editor


    【解决方案1】:

    使用maxLines 选项editor.setOption("maxLines", 1000)

    【讨论】:

      猜你喜欢
      • 2015-05-01
      • 2018-06-03
      • 2012-04-25
      • 2015-02-16
      • 2017-04-28
      • 1970-01-01
      • 2013-10-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多