• 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?

  • The topic ‘wp-editor wont post content at first’ is closed to new replies.