I’m using the CKEditor as default editor and I want to integrate the TinyMCE editor for a plugin. This is my code:
function tiny_page() {
add_options_page(âtinyâ, âtinyâ, âmanage_optionsâ, __FILE__, âtiny_formâ);
}
add_action(âadmin_menuâ, âtiny_pageâ);
/* load the tiny editor*/
function editor_admin_init() {
wp_enqueue_script(âword-countâ);
wp_enqueue_script(âpostâ);
wp_enqueue_script(âeditorâ);
wp_enqueue_script(âmedia-uploadâ);
}
function editor_admin_head() {
wp_tiny_mce();
}
add_action(âadmin_initâ, âeditor_admin_initâ);
add_action(âadmin_headâ, âeditor_admin_headâ);
/* output the plugin page*/
function tiny_form() {
$args = array(âtextarea_rowsâ => 5, âtextarea_nameâ => âeditor_content_1?);
wp_editor(âMy editor contentâ, âmy_editor_1?, $args);
}
The problem is that the output plugin editor is the CKEditor and not the tiny oneâ¦
Any ideas?
From WordPress’ WP Editor documentation:
Try changing “my_editor_1” to “mycustomeditor” or something unique that follows the documentation’s standards.