Post your trick

How to destroy or remove Tiny MCE control from jquery dialog on ajax request?

To use tiny mce in a jquery dialog and clear the contents of tinymce  on close of the overlay use the following function :

$(”id-for-dialog”).bind( “dialogclose or dialogbeforeclose”, function(event, ui) {
tinyMCE.execCommand( ‘mceRemoveControl’, true, ‘id-for-editor’ );
});

This will enable loading of new content into the tinymce editor whenever the jquery dialog reopens .


Post A Trick !

How does "Kodetricks" work?

We at kodeplay like to share knowledge. With Kodetricks, even you can join us. All you need to do is post a programming related trick if you have one or rate a trick if you like someone else's.



Technology

Contact Us