#39887 closed defect (bug) (duplicate)
function of wp_editor
Reported by: | kkking | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.7.2 |
Component: | Editor | Keywords: | |
Focuses: | Cc: |
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
@
8 years ago
- Component changed from Gallery to Editor
- Description modified (diff)
- Focuses administration removed
- Keywords reporter-feedback added
#2
follow-up:
↓ 5
@
8 years ago
@swissspidy
hello ,I put this code to functions.php
open "wp-admin/post-new.php"
#3
@
8 years ago
- Keywords reporter-feedback removed
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to 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
@
8 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
@
8 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.
Hey there,
Welcome to Trac! What exactly is the problem with
wp_editor()
?