In TinyMCE 4.x how do you attach a click event handler to content? -


i have been trying many things attach click event handler selection box in tinymce 4.0.2 content no success. know how in custom plugin? following have tried not functioning.

ctr++;                       var id = 'vnetforms_elem_'+ctr; editor.insertcontent('<select id="'+id+'"><option>x</option</select>');                      tinymce.dom.domutils.bind(tinymce.activeeditor.dom.select('#'+id)[0],'click',function() {     alert('click!'); }); 

using jquery may help:

$(ed.getbody()).find('#'+id).bind('click', function() {     alert('click!'); }); 

Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

java - More than one row with the given identifier was found: 1, for class: com.model.Diagnosis -