提交 5cc279b6 编写于 作者: J Jason Park

editor autocomplete

上级 d8a5b8f7
......@@ -113,6 +113,7 @@
<script src="js/sigma/sigma.min.js"></script>
<script src="js/sigma/plugins/sigma.plugins.dragNodes.min.js"></script>
<script src="js/ace/ace.js"></script>
<script src="js/ace/ext-language_tools.js"></script>
<script src="js/module/tracer_manager.js"></script>
<script src="js/module/tracer.js"></script>
<script src="js/module/directed_graph.js"></script>
......
......@@ -16,8 +16,14 @@ $('#btn_interval input').on('change', function () {
});
var $module_container = $('.module_container');
ace.require("ace/ext/language_tools");
var initEditor = function (id) {
var editor = ace.edit(id);
editor.setOptions({
enableBasicAutocompletion: true,
enableSnippets: true,
enableLiveAutocompletion: true
});
editor.setTheme("ace/theme/tomorrow_night_eighties");
editor.session.setMode("ace/mode/javascript");
editor.$blockScrolling = Infinity;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册