当我试图用一个不是' editor‘的id加载ace编辑器时,编辑器将不会出现。
<div style="position:relative;min-height:400px;">
<div id="editor-fr">
</div>
</div>
{{ HTML::script('js/ace-builds/src-noconflict/ace.js') }}
<script>
var editor = ace.edit("editor-fr");
editor.setTheme("ace/theme/monokai");
editor.getSession().setMode("ace/mode/html");
</script>在下面的代码中,如果我将id更改为editor,一切都会正常工作。我为什么不使用id编辑器是因为我的页面需要2个编辑器


发布于 2016-04-09 02:35:11
如下所示设置编辑器的宽度和高度:
<div id="editor-fr" style="height: 500px; width: 500px"></div>https://stackoverflow.com/questions/36337390
复制相似问题