diff options
author | Marc Delisle <marc@infomarc.info> | 2014-11-11 18:33:31 +0300 |
---|---|---|
committer | Marc Delisle <marc@infomarc.info> | 2014-11-11 18:33:31 +0300 |
commit | 4ccb8df7ea2e8f786c7592e12f994c29bfb5b5c8 (patch) | |
tree | 7ca6e48f597898d9363f18eed7d4dd874c25bf0c /js/rte.js | |
parent | f8d68e62727edff403a46e04ddfa5d6923659884 (diff) | |
parent | a4c2cfea879f1cf221d81804ce1d6fbd30039788 (diff) |
Merge pull request #1394 from nisargjhaveri/autocomplete
SQL autocomplete in RTE editors
Diffstat (limited to 'js/rte.js')
-rw-r--r-- | js/rte.js | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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); } @@ -342,12 +345,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); |