wp_editor() renders outside wrapping div

WordPress Development Asked on December 9, 2020

If have a plugin with a text box. I wish to replace the text box with an editor.

My source code is

            <div id="editorwrap">
            <?php wp_editor("testing","the-editor"); ?>

I expect that the editor will render within the div however here is the source code from the page.

The editor is right at the top of the entry-content div and my div is at the bottom of this sample.

<div class="entry-content">
        <div id="wp-the-editor-wrap" class="wp-core-ui wp-editor-wrap tmce-active"><link rel='stylesheet' id='dashicons-css'  href='' media='all' />
<link rel='stylesheet' id='editor-buttons-css'  href='' media='all' />
<div id="wp-the-editor-editor-tools" class="wp-editor-tools hide-if-no-js"><div class="wp-editor-tabs"><button type="button" id="the-editor-tmce" class="wp-switch-editor switch-tmce" data-wp-editor-id="the-editor">Visual</button>
<button type="button" id="the-editor-html" class="wp-switch-editor switch-html" data-wp-editor-id="the-editor">Text</button>
<div id="wp-the-editor-editor-container" class="wp-editor-container"><div id="qt_the-editor_toolbar" class="quicktags-toolbar"></div><textarea class="wp-editor-area" rows="20" autocomplete="off" cols="40" name="the-editor" id="the-editor">testing</textarea></div>

<div id="editorwrap"></div>

What is the trick to getting the editor inside a div in a specific position on the page, rather than at the top?

Add your own answers!

Related Questions

How can I noindex my archive pages?

1  Asked on November 26, 2021 by summer-pratt


admin-ajax error 400

0  Asked on November 26, 2021 by daniel-nebert


Bulk update custom post types

1  Asked on November 26, 2021 by samm-foolt


Upload avatar for post comment

1  Asked on November 26, 2021 by divyang


Non-blocking file_put_contents in function.php

2  Asked on November 26, 2021 by mustafa


Image problem – Multisite image upload broken

1  Asked on November 23, 2021 by prakhar-monga


Where is the htaccess in hosting?

1  Asked on November 23, 2021 by user2007920


How do you approach block structured content?

1  Asked on November 23, 2021 by kevin-all


Google Fonts not loading correctly

1  Asked on November 23, 2021 by octavialo


wp_redirect() function is not working

8  Asked on November 21, 2021 by sans780730


How to search only by post title and category?

1  Asked on November 21, 2021 by carl-jue-nier


Custom form validation

1  Asked on November 21, 2021 by alexander-holsgrove


Ask a Question

Get help from others!

© 2022 All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir