0
id에 의해 에이스 편집기에 대한 참조를 얻을 수있는 방법이 있습니까?에이스 편집기를 ID로 가져 오는 방법이 있습니까?
에이스는 에디터에 대한 참조를 유지하지 않으므로 에디터에 대한 참조를 얻으려면 어떻게해야합니까? 나는 핵심이를 추가하는 것이 좋습니다 싶습니다
ace.getEditorById = function(el) {
if (typeof el == "string") {
var _id = el;
el = document.getElementById(_id);
if (!el) {
return null;
}
if (el && el.env && el.env.editor instanceof Editor) {
return el.env.editor;
}
}
return null;
}
:
이미 ace.edit ("id")가 https://github.com/ajaxorg/ace/blob/v1.2.6/lib/ace/ace.js#L84-L85입니다. –