• Resolved nitish863

    (@nitish863)


    I have custom editable post type in my website from there any registered user can post there content and later edit it.
    Here, am using wp_editor() function to display the default WordPress editor on front-end.

    Below is my code am using for displaying the editor on front-end.

    $cs_job_desc = (isset($cs_job_desc)) ? ($cs_job_desc) : '';
                                                    wp_editor($cs_job_desc, 'cs_job_desc', array(
                                                        'drag_drop_upload' => true,
                                                        'editor_height' => 300,
                                                        'media_buttons' => false,
                                                        'textarea_name' => 'cs_job_desc',
                                                        'teeny' => true,
                                                        'tinymce' => array(
                                                            'resize' => false,
                                                            'wordpress_adv_hidden' => false,
                                                            'add_unload_trigger' => false,
                                                            'statusbar' => false,
                                                            'autoresize_min_height' => 600,
                                                            'wp_autoresize_on' => true,
                                                            'plugins' => 'lists,media,paste,tabfocus,fullscreen,wordpress,wpautoresize,wpeditimage,wpgallery,wplink,wptextpattern,wpview',
                                                            'toolbar1' => 'bold,italic,bullist,numlist,blockquote,link,unlink',
    
                                                        ),
                                                        'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,more',
                                                        'quicktags' => false,
                                                    ));

    For this i am getting the out like this:
    https://prntscr.com/gcdn0z

    However, its strange that the same code is working properly while editing the post.Below is view while editing the post.
    https://prntscr.com/gcdobf

    • This topic was modified 7 years, 3 months ago by bcworkz. Reason: opening backtick must be at col 0
Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    I get an editor with buttons using your code in my theme. The only thing I changed was $cs_job_desc = '';. Be sure your previously set value is a really a string here. If that checks out, look at your browser console and resolve any errors shown. Script errors will prevent button display.

    We appreciate that you tried to use backticks with your code. For code blocks like that, the first backtick must be the first character on the line. A preceding space prevents the backticks from being recognized. It’s more of the forum parser’s problem than yours, but try to work around it. When your code is not formatted correctly it gets corrupted and is difficult to use by others in tests. Fortunately, I was able to fix the problem so I could test. Others are not as well enabled. Thanks for understanding.

    Thread Starter nitish863

    (@nitish863)

    @bcworkz. Thanks for your answer, but it doesn’t work ??

    Moderator bcworkz

    (@bcworkz)

    About the only other explanation would be a theme or plugin conflict. Try deactivating all plugins and switching to one of the twenty* default themes. Temporarily place your code on a theme template somewhere. You will see buttons in the resulting editor. Switch back to your theme and retest. If buttons fail to appear, there’s something about your theme interfering. If buttons still appear, begin activating plugins, one at a time. When the buttons fail again, the last activated plugin is causing a conflict.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘wp_editor() “Button Missing On Frontend”’ is closed to new replies.