WordPress.org

Ready to get started?Download WordPress

Forums

Multiple TinyMCE Editors on Page with Media Buttons (1 post)

  1. royscheeren
    Member
    Posted 3 years ago #

    Hi

    I've created an extra meta box to be shown on every Page. I've got is so far it shows the tinyMCE and the media buttons. But the row of the hmtl buttons and the WYSIWYG buttons are shown above each other instead of on their respective tabs.
    Whenever I try to add an image it is automatically added to the standard editor instead of the one in the meta box.

    Thanks for any help.

    This is the code I've been using to display the boxes:

    add_action('add_meta_boxes', 'page_options');
    
    	add_action('admin_init', 'editor_admin_init');
    	add_action('admin_head', 'editor_admin_head');
    
    	function editor_admin_init() {
    		wp_enqueue_script('word-count');
    		wp_enqueue_script('post');
    		wp_enqueue_script('editor');
    	}
    
    	function editor_admin_head() {
    	  wp_tiny_mce();
    	}
    
    	function page_options() {
    		add_meta_box( "_page_options", "Pagina Opties", "page_options_inner_box", "page", "normal", "high");
    	}
    
    	function page_options_inner_box() { ?>
    		<div id="poststuff">
    
    		<?php
    
    		  	the_editor("sideb", "sideb", $prev_id = 'sidecontent', $media_buttons = true, $tab_index = 4);
    		?>
    		</div>
    		 <?php
    	}

Topic Closed

This topic has been closed to new replies.

About this Topic