Support » Plugins » Hacks » function the_editor bug – link button in visual mode not working

  • I have used wordpress the_editor, everything is working perfect except the link button in visual mode. When I click Link button nothing happens. It is supposed to open the popup where I can enter link and details. In HTML mode it works though.

    I have used following code to initialize the editor

    <?php the_editor($content, $name=’contents’, $prev_id = ‘title’, $media_buttons = true, $tab_index = 2); ?>

    I am accessing plugin with super admin access.

    Also when I access plugin as subscriber I cant see link button at all.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Don’t know if you are still struggling with this. I had the same issue and realized that I was missing a couple required JS dependencies. Specifically, I needed to add:
    wp_enqueue_script( 'tiny_mce_popup', includes_url( 'js/tinymce/tiny_mce_popup.js' ) );

    and:
    add_action( 'admin_footer', 'wp_tiny_mce_preload_dialogs', 30 );

    Note: use the second line if you are trying to load the editor in wp-admin. Otherwise, you should change 'admin_footer' to 'wp_footer'. Also, I added the first line in the function in the admin_init action and that worked for me.

    UPDATE : I’ve done more testing since I posted the above, and it seems that you may not actually have to include the tiny_mce_popup.js script; the wp_tiny_mce_preload_dialogs function should be sufficient

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘function the_editor bug – link button in visual mode not working’ is closed to new replies.