Skip to content

Commit

Permalink
SQL autocomplete in RTE editors
Browse files Browse the repository at this point in the history
Signed-off-by: Nisarg Jhaveri <nisarg.jhaveri@research.iiit.ac.in>
  • Loading branch information
nisargjhaveri committed Nov 10, 2014
1 parent 6cc3ea6 commit a4c2cfe
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion js/rte.js
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit a4c2cfe

Please sign in to comment.