WordPress.org

Forums

tinmce link button won't work (2 posts)

  1. cfraz89
    Member
    Posted 4 years ago #

    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?

  2. Danny van Kooten
    Member
    Posted 4 years ago #

    I'm having the same problem. Did you figure it out yet? Noticed the same scripts in the footer but no luck when I include them.

    Also I tried enqueueing 'editor-functions', still no luck.

    Anyone?

Topic Closed

This topic has been closed to new replies.

About this Topic