You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 8, 2019. It is now read-only.
There's a change event, but it doesn't fire each time the user enters a character. There's also a newword:composer event, but there's nothing like a keyup event as far as I can tell.
Anyone else think a keyup event should be added?
The text was updated successfully, but these errors were encountered:
I think someone mentioned here awhile back a way this could be accomplished by using editor.composer.doc to attach event listeners. I'm using this solution:
var editor = new wysihtml5.Editor("editor");
editor.on("load", function() {
var $doc = $(editor.composer.doc);
$doc.keyup(function(){
// Your code here
});
});
I would like the "change" event to work as one would expect. Currently it only fires when the editor loses focus... I can set a blur event for that, so this is not helpful. I would expect a change event to fire on anything that causes the state of the editor to change - a character typed, text pasted or cut, a style change, etc. Anything that would cause getValue() to return something different.
Then it becomes simple to write auto-save functions, auto-complete, and anything that requires immediate response to content changes. Key up/down is not sufficient for lots of cases that cause content to change without a physical keystroke.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Looking at the events here
https://github.com/xing/wysihtml5/wiki/Events
There's a
change
event, but it doesn't fire each time the user enters a character. There's also anewword:composer
event, but there's nothing like akeyup
event as far as I can tell.Anyone else think a
keyup
event should be added?The text was updated successfully, but these errors were encountered: