diff --git a/js/rte.js b/js/rte.js index cdae5414f8..d13a526091 100644 --- a/js/rte.js +++ b/js/rte.js @@ -142,11 +142,14 @@ RTE.COMMON = { var opts = { lineNumbers: true, matchBrackets: true, + extraKeys: {"Ctrl-Space": "autocomplete"}, + hintOptions: {"completeSingle": false, "completeOnSingleClick": true}, indentUnit: 4, mode: "text/x-mysql", lineWrapping: true }; - CodeMirror.fromTextArea($elm[0], opts); + CodeMirror.fromTextArea($elm[0], opts) + .on("inputRead", codemirrorAutocompleteOnInputRead); } else { PMA_ajaxShowMessage(data.error, false); } @@ -338,12 +341,15 @@ RTE.COMMON = { var opts = { lineNumbers: true, matchBrackets: true, + extraKeys: {"Ctrl-Space": "autocomplete"}, + hintOptions: {"completeSingle": false, "completeOnSingleClick": true}, indentUnit: 4, mode: "text/x-mysql", lineWrapping: true }; if (typeof CodeMirror != 'undefined') { that.syntaxHiglighter = CodeMirror.fromTextArea($elm[0], opts); + that.syntaxHiglighter.on("inputRead", codemirrorAutocompleteOnInputRead); } // Execute item-specific code that.postDialogShow(data);