contenteditable - How can I detect an emoji insert event from the OS X character viewer and iOS emoji keyboard in Javascript/Redactor? -
i'm having trouble getting redactor (a wysiwyg contenteditable web editor imperavi) recognize character insert event results os x character viewer , inline emoji palettes, ios emoji palette.
redactor doesn't sync change until add, say, space or trigger paste event. gets picked , saved 1 expect. forcing sync before submitting form doesn't appear pick character either (or i'm doing wrong).
is there particular event associated insert triggered these os x/ios palettes, or have workaround ideas getting redactor notice character?
try @ http://imperavi.com/redactor/examples/placeholder/ ; click inside text entry area, invoke emoji palette using ⌘-ctrl-space , click emoji insert it. placeholder not disappearing 1 indicator insert didn't register.
the domcharacterdatamodified event notices insert , can used trigger .redactor('code.sync').
so set event listener in initcallback , use when underlying textarea used redactor appears empty; because after sync, content consisting solely of emoji doesn't synced going forward. (when textarea has content, syncing appears include emoji).
Comments
Post a Comment