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
Post a Comment