#39887 closed defect (bug) (duplicate)
function of wp_editor
| Reported by: | kkking | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Editor | Version: | 4.7.2 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description (last modified by )
add_action( 'add_meta_boxes', function(){
$key = "test";
add_meta_box($key,'test',function() use($key){
wp_editor('', $key);
});
} );
Attachments (1)
Change History (8)
#1
@
9 years ago
- Component Gallery → Editor
- Description modified (diff)
- Focuses administration removed
- Keywords reporter-feedback added
#2
follow-up:
↓ 5
@
9 years ago
@swissspidy
hello ,I put this code to functions.php
open "wp-admin/post-new.php"
#3
@
9 years ago
- Keywords reporter-feedback removed
- Milestone Awaiting Review
- Resolution → duplicate
- Status new → closed
Ah thanks, now I see what you mean.
This issue is being tracked in #19173.
From the comments there:
wp_editor() shouldn't be used in a metabox. do_action('edit_page_form') or do_action('edit_form_advanced') are the proper places for it.
This only applies for wp_editor() with the visual editor enabled. HTML-only should be fine.
#4
@
9 years ago
@swissspidy
add_action( 'add_meta_boxes', function(){
$key = "test";
$key1 = "test1";
add_meta_box($key1,'test',function($post)use($key){
wp_editor('', $key);
});
} );
#5
in reply to: ↑ 2
;
follow-up:
↓ 7
@
9 years ago
Replying to kkking:
hello ,I put this code to functions.php
open "wp-admin/post-new.php"
it show like this image...
Just tested this and it works as expected here. Of course the editor "crashes" if you move the metabox in the dom as @swissspidy mentioned above, but it works properly if you don't. Please check the rest of your code or any active plugins that may interfere with the CSS or JS.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)

Hey there,
Welcome to Trac! What exactly is the problem with
wp_editor()?