Activating Wordpress TinyMCE editor for a text area

I am trying to activate TinyMCE for the text area. My code is below

wp_editor( '', 'content-id', array( 'textarea_name' => 'txtmessage', 'media_buttons' => false, 'tinymce_adv' => array( 'width' => '300', 'theme_advanced_buttons1' => 'formatselect,forecolor,|,bold,italic,underline,|,bullist,numlist,blockquote,|,justifyleft,justifycenter,justifyright,justifyfull,|,link,unlink,|,spellchecker,wp_fullscreen,wp_adv' ) ) ); 
echo "\r\n";
echo "\r\n";
echo "\r\n --------Original Message-------- \r\n \r\n";
echo "\r\n\r\n".$reply_message_contentmain;

The code works. However, my problem is that the echo message show at the bottom and outside of TinyMCE area. Any suggestion, how to fix it? I am not a php expert. Thanks,


The syntax on wp_editor() is:

<?php wp_editor( $content, $editor_id, $settings = array() ); ?> 

You've left $content blank and are echo'ing after the editor call.... so do something like:

$content = '\r\n\r\n\r\n--------Original Message-------- \r\n\r\n\r\n' .$reply_message_contentmain
wp_editor( $content, 'content-id', array( 'textarea_name' => 'txtmessage', 'media_buttons' => false, 'tinymce_adv' => array( 'width' => '300', 'theme_advanced_buttons1' => 'formatselect,forecolor,|,bold,italic,underline,|,bullist,numlist,blockquote,|,justifyleft,justifycenter,justifyright,justifyfull,|,link,unlink,|,spellchecker,wp_fullscreen,wp_adv' ) ) );

This should work but I can't test it from where I am at the moment, let me know how you go (but this should put you on the right track)

Need Your Help

Custom inputView for UITextField , how do I direct input back to the text field?

ios cocoa-touch uitextfield first-responder inputview

I have set a custom inputView to my UITextField. I need a way to display the data selected in my custom inputView in the UITextfield. I would like to achieve this the same way the system keyboard d...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.