How to add a extra Tinymce Editor to custom Admin pages
-
Hello I am using the following plugin (https://codex.www.ads-software.com/Adding_Administration_Menus) to create my own custom admin pages. The plugin works great and so do the admin pages.
The problem is that when I try to add textareas to my pages I can not get the tinymce editor to work correctly. I have included the same code that is used in the post-new.php pages.
Ex:
This code at the top of the pages:
<?php
wp_enqueue_script(‘autosave’);
wp_enqueue_script(‘post’);
if ( user_can_richedit() )
wp_enqueue_script(‘editor’);
wp_enqueue_script(‘thickbox’);
wp_enqueue_script(‘media-upload’);
?>
This code in the Divs:
<div id=”poststuff”>
<div id=”post-body”>
<div id=”postdivrich” class=”postarea”>
<h3><?php _e(‘Content’) ?></h3>
<?php the_editor($Spot->Content); ?>
<?php wp_nonce_field( ‘autosave’, ‘autosavenonce’, false ); ?>
<?php wp_nonce_field( ‘closedpostboxes’, ‘closedpostboxesnonce’, false ); ?>
<?php wp_nonce_field( ‘getpermalink’, ‘getpermalinknonce’, false ); ?>
<?php wp_nonce_field( ‘samplepermalink’, ‘samplepermalinknonce’, false ); ?></div>
</div>
</div>Any help would be great.
Thanks in advance.LK
- The topic ‘How to add a extra Tinymce Editor to custom Admin pages’ is closed to new replies.