[wp-trac] [WordPress Trac] #47617: Using wp_editor in {$taxonomy}_edit_form_fields not working
WordPress Trac
noreply at wordpress.org
Thu Jun 27 13:18:01 UTC 2019
#47617: Using wp_editor in {$taxonomy}_edit_form_fields not working
-----------------------------+-----------------------------
Reporter: flyonthenet.com | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
Focuses: |
-----------------------------+-----------------------------
Consider this simple piece of code:
{{{
function test_form_fields( ) {
echo '<tr class="form-field term-description-wrap"><th
scope="row">Snippet</th><td>';
wp_editor( 'TEST', 'snippet', array(
'textarea_name' => 'snippet'
));
echo '</td></tr>';
}
add_action( 'category_add_form_fields', 'test_form_fields');
add_action( 'category_edit_form_fields', 'test_form_fields');
}}}
It's expected to show a functional TinyMCE editor, but something weird is
rendered, seems mixed up with description field.
[[Image(https://www.bagaria.it/wp-content/uploads/2019/06/wp_editor.png)]]
* Content not displayed (empty tinyMCE)
* No toolbar rendered
* No textarea tag with id "snippet" in source code
* Media / Visual / Text are applied to description field
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47617>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list