emoji-picker icon indicating copy to clipboard operation
emoji-picker copied to clipboard

Capability to detect change on input

Open stevef opened this issue 7 years ago • 1 comments

Is there an event I can use to detect if the input/textarea has been changed at all, whether directly by the user or via the WYSIWYG editor?

stevef avatar Feb 20 '18 02:02 stevef

Incase someone comes across this issue, there seems to be an option for this. Set norealTime to false, which will allow you to see events as the user types in them on blur, change and keyup.

window.emojiPicker = new EmojiPicker({
	emojiable_selector: '[data-emojiable=true]',
	assetsPath: '../img/',
	popupButtonClasses: 'fa fa-smile-o',
	norealTime: false
});

philhawthorne avatar Apr 10 '19 02:04 philhawthorne

Via the WYSIWYG editor, you can bind an input event handler to the contenteditable div

document.getElementById("editor").addEventListener("input", function() {
    console.log("input event fired");
}, false);

Reference

linktoahref avatar Jan 18 '23 11:01 linktoahref