diff options
Diffstat (limited to 'src/main/webapp/javascripts/libs/fiddleEditor.js')
-rw-r--r-- | src/main/webapp/javascripts/libs/fiddleEditor.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/webapp/javascripts/libs/fiddleEditor.js b/src/main/webapp/javascripts/libs/fiddleEditor.js index fde714d..d6ddc82 100644 --- a/src/main/webapp/javascripts/libs/fiddleEditor.js +++ b/src/main/webapp/javascripts/libs/fiddleEditor.js @@ -25,6 +25,14 @@ define(["CodeMirror", "MySQLCodeMirror", "jQuery"], function (CodeMirror, myMode this.textArea = document.getElementById(domID); $(this.textArea).on('change', function(){ changeHandler.call(viewRef) }); $(this.textArea).on('keyup', function(){ changeHandler.call(viewRef) }); + $(this.textArea).on('keypress', function(e){ + if (e.keyCode == 13 && e.ctrlKey && runHandler) + { + e.preventDefault(); + runHandler(); + } + }); + $(this.textArea).attr('fullscreen',false); } |