• Hello,

    I am in trouble.
    I would like to manage a wysiwyg editor in a front end form. I want to permit my users (without connexion) to write a text in the wysiwyg editor.

    For that, I used the worpdress function wp-editor.
    Below my code
    ————————————————————————
    $content = “”;
    $editor_id = ‘result_description’;
    $settings = array(
    ‘wpautop’ => false,
    ‘media_buttons’ => false,
    ‘textarea_name’ => ‘result_description’,
    ‘textarea_rows’ => 15,
    ‘teeny’ => true,
    ‘tinymce’=> array(
    ‘toolbar1’=>bold,italic,underline,bullist,numlist,formatselect,fontsizeselect’ ),
    ‘quicktags’ => false
    ) ;

    wp_editor( $content, $editor_id, $settings );
    ———————————————————————

    With this code I can see the wysiwyg editor in the form but the problem is when I submit my form. I used POST method to fill the post_content of my custom post.
    $content = $_POST[‘event_description’];

    –> My variable $content stay empty.

    For information I installed the plugins Tinymce for the front back.
    Morever, I have the following js error on my page: Uncaught ReferenceError: getUserSetting is not defined – plugin.min.js?wp-mce-4107-20150118:1. So maybe is linked.

    Do you have any idea to solve my problem?How can I do to include a wysiwyg editor in my form and get the value filled?

    Best regards,

    Gwen

Viewing 1 replies (of 1 total)
  • Thread Starter Gwentrac

    (@gwentrac)

    Sorry a made a mistake.

    But You have to read “$content = $_POST[‘result_description’]” and not $content = $_POST[‘event_description’];

    Best regards,

    Gwen

Viewing 1 replies (of 1 total)
  • The topic ‘How to used wp-editor in front end’ is closed to new replies.