[英]How to make an intellisense for array type json in ACE.js editor?
我一直在将Ace.js用于我的JavaScript编辑器。 我创建了一个js文件,以使我的ace编辑器成为自动完成程序。
autoCompleter的MyJs文件:
var editorDefinitions = {
"!name": "myeditor",
"profilVerileri":
[{ "test": "fsdf", "id": "1" }, { "test": "fsdf", "id": "2" }, { "test": "dasd", "id": "3" }],
但是我的数组自动完成程序不起作用。 往下看 :
如果您查看我想要的自动完成器:
在按下“ profilVerileri [i]”后,“ test”应自动完成。
我的整个代码是:
var defs = [editorDefinitions];
var ternServer = new TernServer({
defs: defs
});
editor.ternTooltip = new TernTooltip(editor, ternServer);
LangTools.addCompleter(ternServer);
editor.setOptions({
enableBasicAutocompletion: true
});
editor.focus();
您可能需要打开实时自动补全功能
editor.setOptions({
enableBasicAutocompletion: true,
enableLiveAutocompletion: true,
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.