How to add wp_editor Dynamically

Add this to your php file

wp_enqueue_editor();

Add this on your script after you load the wp_editor elements to your web page.

tinymce.execCommand( ‘mceRemoveEditor’, false, ‘proj_desc’ );
tinymce.execCommand( ‘mceAddEditor’, false, ‘proj_desc’ );
quicktags({id : “proj_desc”});

 

Source: https://carlofontanos.com/loading-wp_editor-via-ajax/