How do I initialize TinyMCE on a ajax loaded textarea in 4.x?

Mike Dotterer picture Mike Dotterer · Oct 24, 2013 · Viewed 34k times · Source

I am upgrading to tinyMCE 4.x and I am attempting to initialize tinyMCE on a textarea loaded via AJAX. In 3.x I did something of the sort: TinyMCE - attach to divs loaded via AJAX calls but this does not seem to work in 4.x.

Answer

Arquimedes de Siracusa picture Arquimedes de Siracusa · Mar 22, 2015
tinymce.remove();
tinymce.init();

This works well!