Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

David on "wp-editor wont post content at first"

$
0
0

I'm using wp-editor in a simple plugin, but I'm having an issue where the first time I hit the submit button the content from it is blank in the database.

<?php
$editor_id = 'mycontent';
wp_editor($content, $editor_id );
?>

So I tried alerting the content using this:

if (j(".wp-content-wrap").hasClass("tmce-active")){
   alert( tinyMCE.activeEditor.getContent());
}else{
   alert( j('#mycontent').val());
}

and the first submit comes up empty. If I switch to the text version before I submit, it works.

What am I doing wrong here that prevents the submit from working?


Viewing all articles
Browse latest Browse all 8245

Trending Articles