[wp-trac] [WordPress Trac] #14311: No media insertion support using the the_editor() function
WordPress Trac
wp-trac at lists.automattic.com
Thu Jul 15 00:07:43 UTC 2010
#14311: No media insertion support using the the_editor() function
--------------------------+-------------------------------------------------
Reporter: DreadLox | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: 3.0
Severity: major | Keywords: editor, meta-boxes, wysiwyg, the_editor
--------------------------+-------------------------------------------------
Comment(by DreadLox):
Having a deep look to it, here is what to be changed to have it work:
1) media-upload.dev.js line 62:
{{{
if ( typeof tinyMCE != 'undefined' && tinyMCE.activeEditor ) {
tinyMCE.get('content').focus();
tinyMCE.activeEditor.windowManager.bookmark =
tinyMCE.activeEditor.selection.getBookmark('simple');
}
}}}
'content' should be replaced with a variable sent when clicking the media
upload button and should reflect the Id parameter of the_editor() function
2) by default the get_media_item function will not show an "insert into
article" button unless the posttype has the "editor" capability (wp-
admin/includes/media.php line 1166, it still can be overwritten using the
$args argument) There should be a workaround to have it enabled even if
editor capability is not set for a posttype (additional argument to
the_editor function ?)
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14311#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list