Feature: Auto-Completion in Source Code

+ allow flags for exercises
This commit is contained in:
Ralf Teusner
2016-09-07 17:34:20 +02:00
parent b8da4dea17
commit 8f499b72da
10 changed files with 29 additions and 5 deletions

View File

@@ -221,6 +221,17 @@ var CodeOceanEditor = {
editor.setReadOnly($(element).data('read-only') !== undefined);
editor.setShowPrintMargin(false);
editor.setTheme(this.THEME);
// set options for autocompletion
if($(element).data('allow-auto-completion')){
editor.setOptions({
enableBasicAutocompletion: true,
enableSnippets: false,
enableLiveAutocompletion: true
});
}
editor.commands.bindKey("ctrl+alt+0", null);
this.editors.push(editor);
this.editor_for_file.set($(element).parent().data('filename'), editor);