Hi guys,
I've made a plugin which adds an admin page, part of which contains a reused tinymce editor. It was brought up like this:
add_action('admin_menu', 'eaf_newsletter_menu');
add_filter('admin_head','eaf_newsletter_tinymce');
function eaf_newsletter_menu() {
$np = add_menu_page('EAF Digest', 'EAF Digest', 'administrator', 'eaf-newsletter', 'eaf_newsletter');
$np = add_submenu_page('eaf-newsletter', 'EAF Digest', 'Create', 'administrator', 'eaf-newsletter', 'eaf_newsletter');
add_action('admin_print_styles-'.$np, 'eaf_newsletter_style');
add_action('admin_print_scripts-'.$np, 'eaf_newsletter_script');
}
function eaf_newsletter_tinymce() {
wp_print_scripts('editor');
wp_tiny_mce();
}
<div id="poststuff">
<div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>" class="postarea">
<?php the_editor(''); ?>
</div>
</div>
And it mostly works, however the link button does not. I understand that wordpress loads a custom plugin, wplink, for this, so the necessary script probably hasn't been loaded yet.
However, I haven't found a way to make this happen yet.
Any ideas?