Friday, May 16, 2008

Dynamic TinyMCE / TinyMCE and AJAX

Quick note about adding and removing TinyMCE editor when working with AJAX style pages. Standard initialization tinyMCE.init() is not accepatable but we can use another function to add/remove editor dynamically.

// add editor
tinyMCE.execCommand("mceAddControl", true, elementId);

// remove editor
tinyMCE.execCommand("mceRemoveControl", true, elementId);

0 comments: