Is there a way I can have an event listener for input on the document for a tinymce editor?

28 Views Asked by At

I have some generic code that handles input events for textareas (and other fields) that are created dynamically, so the event listener is on the document.

I am integrating TinyMCE (v6.6.2), but after making a textarea into a TinyMCE field, the input the handler is no longer called.

I know I can setup a handler in the TinyMCE init, but due to my architecture, it would be much cleaner to keep it where it is. Is there a way to do this?

Example Fiddle: https://jsfiddle.net/ja98y3b0/1/ - Note that document.addEventListener("input" ... is not even called when the TinyMCE field has input.

0

There are 0 best solutions below