ckeditor 捕获键代码
1 <!--<script type="text/javascript"> 2 var ctrlKey = false; 3 var shiftKey = false; 4 if(typeof(CKEDITOR)!='undefined') { 5 for(instance in CKEDITOR.instances) { 6 var editor = CKEDITOR.instances[instance]; 7 editor.on('instanceReady', function(){ 8 this.document.on("keydown", function(e) { 9 var keyCode = e.data.getKey(); 10 if(keyCode == 17) { 11 ctrlKey = true; 12 } else if(keyCode == 16) { 13 shiftKey = true; 14 } 15 //console.debug(keyCode); 16 },null,null,1) 17 this.document.on("keydown", function(e) { 18 var keyCode = e.data.getKey(); 19 if(ctrlKey && keyCode == 86) { 20 alert(editor); 21 var dialogObj = new CKEDITOR.dialog(editor, function() {}); 22 alert(dialogObj); 23 dialogObj.show(); 24 } 25 //console.debug(keyCode); 26 },null,null,1) 27 }); 28 } 29 } 30 </script>-->