Normalizing The Codemirror Onkeyevent With Jquery
I'm using CodeMirror along with jQuery to provide syntax highlighting on a pet PoC project. It's been doing great, until I realized that CodeMirror seems to be capturing key press
Solution 1:
$.Event
is for creating custom events, i.e. to trigger them on your own later. You want $.event.fix
.
var cm = CodeMirror.fromTextArea(someTextArea, {
onKeyEvent : function (editor, e) {
hotkey($.event.fix(e));
}
});
Post a Comment for "Normalizing The Codemirror Onkeyevent With Jquery"