I recently tried to integrate TinyMce 4.0 into my web application. I want to put a click event when I click on a text field, but it does not work. I looked at the official documentation and I tried the following code:
tinyMCE.init({
...
setup : function(ed) {
ed.onClick.add(function(ed, e) {
console.debug('Editor was clicked: ' + e.target.nodeName);
});
}
You will receive an error message: "TypeError: ed.onClick is undefined".
So, I tried to put the onclick event directly in the iframe, but this fails:
$("iframe").contents().bind('click', function(){
...
});
Do you have any ideas on how to do this?
source
share