Chang
Chang

Reputation: 1716

keyup event in CKEditor

I'm using CKEditor and have an initEditor function that bootstraps all the event handler function of the editor instance like this:

btw, I'm using CoffeeScript

editor.on 'change', => ...
editor.on 'blur', => ...
editor.on 'key', => ...

and soon I found that the keyevent is actually keydown, I wonder there is a keyup event API, because this doesn't seem to work in my code:

editor.on 'keyup', => ...

and I got an error:

TypeError: editor.onKeyup is not a function

in:

editor.onKeyup((e) => {...})

Upvotes: 0

Views: 3546

Answers (1)

Anton Stepanenkov
Anton Stepanenkov

Reputation: 1036

Editor doesn't have a keyup event. If you want to catch it you should bind it to editors dom.

editor.document.on('keyup',function(){alert('kek')});

Upvotes: 1

Related Questions