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

How to logout from a login page in asp.net -

Stack level too deep error after upgrade to rails 3.2 and ruby 1.9.3 -