I've written an admin wordpress plugin for WordPress 3.1. The wordpress plugin includes a TinyMCE textarea. I'm using jQuery Form to submit the shape data towards the processing page. The TinyMCE textarea shows correctly and I can type content in it. However, after i send the information towards the processing page, all data except this content from the TinyMCE textarea is distributed and also the processing page returns the expected result. Basically click send again, the TinyMCE date is distributed. How is this fixed?

This is actually the javascript:

    <script type="text/javascript">    
jQuery(document).ready(function() { 
        var options = { 
            target: '#output',
            url: '../wp-content/plugins/kac/ajax/send_email_to_list.php'
        }; 

    jQuery('#form1').ajaxForm(options);
}); 

function showResponse(responseText, statusText, xhr, $form)  { 

    alert('status: ' + statusText + '\n\nresponseText: \n' + responseText + 
        '\n\nThe output div should have already been updated with the responseText.'); 
} 
</script>

This is actually the html:

<form method="post" id="form1" name="form1">
<label for="subject">
Subject:
</label><br />
<input name="subject" id="subject" type="text" size="40" maxlength="100" /><br /><br />
<?php
wp_tiny_mce( false , // true makes the editor "teeny"
    array(
        "editor_selector" => "myeditor"
    )
);

?>
<label for="message">

Message: 
</label>
<textarea class="myeditor" id="message" name="message"></textarea><br /><br />
<input name="send" id="send" type="submit" value="Send" />
</form>    

You have to be conscious that tinymce isn't equal the textarea! Tinymce will hide the textarea on intialization and make an iframe where the user may edit content. As a result it is required to call the tinymce save method to be able to write the iframes content to the textarea.

Which means you require the following code

var editor = tinymce.get( editor_id);
editor.save();  // writes content back to the textarea
// you may now use jQuery or editor.getContent(); to acces the content