I am using ACE
editor for the first time. I have the below questions related to it.
如何在页面上找到
ACE
编辑器的实例?我不想How to get and set its value?
我开放给任何比ACE
编辑器更好的编辑器的建议,这将支持几乎所有类型的语言/标记/CSS等,并与jQuery
高度集成.
I am using ACE
editor for the first time. I have the below questions related to it.
如何在页面上找到
ACE
编辑器的实例?我不想How to get and set its value?
我开放给任何比ACE
编辑器更好的编辑器的建议,这将支持几乎所有类型的语言/标记/CSS等,并与jQuery
高度集成.
Per their API:
Markup:
<div id="aceEditor" style="height: 500px; width: 500px">some text</div>
Finding an instance:个
var editor = ace.edit("aceEditor");
Getting/Setting Values:
var code = editor.getValue();
editor.setValue("new code here");
根据我的经验,Ace是我见过的最好的代码编辑器.很少有其他的,比如CodeMirror等,但我发现它们不如Ace有用或难以集成.
Here's a Wiki page for comparision of such editors.
还有一种付费的,我还没有试过(我现在记不清了).如果我能找到的话稍后会更新的.