I want to add WP editor with TinyMCE to my custom text widget, but it won’t show TinyMCE buttons it just shows textarea.
When I test my code on page.php it works perfectly – editor shows with all the buttons and metabox.
Can You please tell me what I’m doing wrong?
EDIT
Widgets screenshot.
Same code used in page.php screenshot
The code I use :
$settings = array(
'wpautop' => true,
'media_buttons' => false,
'textarea_name' => 'test-editor',
'textarea_rows' => get_option('default_post_edit_rows', 10),
'tabindex' => '',
'editor_css' => '',
'editor_class' => '',
'teeny' => true,
'dfw' => true,
'tinymce' => array(
'theme_advanced_buttons1' => 'bold,italic,underline'
),
'quicktags' => false
);
wp_editor( 'Text in editor', 'test-editor', $settings );
Looks like you need to find another WYSIWYG editor. Reading the Codex, there are two issues with your code:
The
$editor_id
And this one that prevents the editor from working in a meta box