【问题标题】:Capture Ace Editor Inside a table在表格中捕获 Ace 编辑器
【发布时间】:2014-06-06 01:47:34
【问题描述】:

所以我正在尝试使用 Ace Editor 来让您编辑代码。我希望一侧显示文本编辑器,一侧显示代码结果。我的问题是,Ace Editor 不能在表格内执行。 http://prntscr.com/3q2xwd我该怎么做才能解决这个问题?

【问题讨论】:

    标签: html css text editor ace-editor


    【解决方案1】:

    看起来您正在将position:absolute 样式添加到编辑器中,这里似乎可以正常工作http://jsbin.com/ojijeb/609/edit

    【讨论】:

      【解决方案2】:

      由于尚未接受任何答案,并且用户提供的链接不再有效,我建议对 Ace Editor 使用以下样式(而不是 front page 的建议):

      #editor {
          height: 200px;
          width: 100%;
      }
      

      在存储库中,还有其他示例显示如何嵌入编辑器,请参阅https://github.com/ajaxorg/ace-builds/tree/master/demo

      【讨论】:

        猜你喜欢
        • 2014-10-02
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2019-11-30
        • 2015-11-25
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多