Closed vviikk closed 9 years ago
Try something like
editor.getElement('editor').addEventListener('keydown',function (e) {
console.log(e.keyCode)
})
Check out the getElement
docs on what elements you can bind to
Apologies. I was doing it on the main editor
element.
Here's my solution. Worked like a charm. Thanks.
editor.getElement('editor').addEventListener('keydown',function (e) {
if (e.keyCode == 13 && (e.metaKey || e.ctrlKey)) {
$("#post-comment").click();
}
})
Doesn't seem to work