Using the wp_editor() function is an easy thing, but it won’t work when i try to call it on a custom empty page without the needed styles and scripts loaded.
In the old day you could use:
add_filter('admin_head','ShowTinyMCE');
function ShowTinyMCE() {
// conditions here
wp_enqueue_script( 'common' );
wp_enqueue_script( 'jquery-color' );
wp_print_scripts('editor');
if (function_exists('add_thickbox')) add_thickbox();
wp_print_scripts('media-upload');
if (function_exists('wp_tiny_mce')) wp_tiny_mce();
wp_admin_css();
wp_enqueue_script('utils');
do_action("admin_print_styles-post-php");
do_action('admin_print_styles');
}
To load all the needed scripts and then activate your editors, but wp_tiny_mce is deprecated since wp 3.3, and now i’m wondering.. what hooks etc. to use to manually load all the needed scripts and styles?
Anyone?
You have:
wp_enqueue_script('tiny_mce');
wp_enqueue_script('editor');
wp_enqueue_script('media-upload');
wp_enqueue_script('editor-functions');
But that doesn’t seem to be enough… wp_enqueue_script(‘common’);
Are you sure it does not work itself? I remember using it and I think I did not enqueue any scripts or styles, the function handles that I believe.
Check the function description: Using this function is the proper way to output all needed components for both TinyMCE and Quicktags.
Yeah it works great and easy on pages…
But my problem is i’m busy loading things through ajax…
So i wonder if i could figure out what kind of things are output by it, the scripts etc. Or if there’s a way i could catch it…
But i’ll find a way! 
