I added TinyMCE(version 4.0.2) editor in a existing HTML form in my project(PHP,Codeigniter). My final target is to enable the form submit button if any changes occur in the form including TinyMCE editor. I can do it only with the form except TinyMCE editor. I could not detect TinyMCE changes.
I want to detect if any change occur when key up. I have seen that tinymce has an onchange function like bellow.
setup : function(ed) {
ed.onChange.add(function(ed, l) {
console.debug('Editor contents was modified. Contents: ' + l.content);
});
I putted upper setup code inside the bellow init function, but no output i have found.
tinymce.init({ });
Can you tell how to detect change, or any better idea?