#28440 closed enhancement (worksforme)
WP_Editor() - Disable Drag Drop Upload
Reported by: | Howdy_McGee | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.9.1 |
Component: | TinyMCE | Keywords: | |
Focuses: | ui, javascript, administration | Cc: |
Description (last modified by )
This could be the same problem as my last ticket (#28338) but it seems like the drag_drop_upload
flag that is currently in the codex may be broken. I've tried this on a few installs and was unable to actually disable the drag and drop upload functionality:
wp_editor($editor_content, 'editorID', array( 'wpautop' => true, 'media_buttons' => false, 'textarea_name' => '_editor_name', 'textarea_rows' => 15, 'teeny' => true, 'drag_drop_upload' => false ));
You can view The Codex here (http://codex.wordpress.org/Function_Reference/wp_editor) which is the last option in the arguments list.
Change History (4)
#2
follow-up:
↓ 3
@
10 years ago
- Milestone Awaiting Review deleted
- Resolution set to worksforme
- Status changed from new to closed
#3
in reply to:
↑ 2
@
10 years ago
Replying to azaozz:
Works properly when testing on the Edit Post screen. Note: if there are several instances of TinyMCE created with wp_editor() and one sets
'drag_drop_upload' => true
, it will be enabled.
I apologize I should have clarified in my original post, that is correct. Shouldn't it be on a case by case basis whether or not you allow images into the editor? For example, if I add a metabox onto a Page but don't want images to be uploaded into the content of the metabox and still allow images to be uploaded to the actual Page Content there is currently no way to disable 1 without the other. It's an all or nothing flag which seems misleading.
#4
@
10 years ago
Shouldn't it be on a case by case basis whether or not you allow images into the editor?
This actually does a "standard" uploading, same as dropping a file on the media modal or on Media Library => Add New. It is attached/active for the whole page, not possible to enable only for one instance of the editor.
If you're worried about the blue "drop-zone", that can probably be disabled on per-instance basis. However it doesn't make any difference on which editor instance a file is dropped. It will be uploaded as if dropped on the media modal.
Works properly when testing on the Edit Post screen. Note: if there are several instances of TinyMCE created with wp_editor() and one sets
'drag_drop_upload' => true
, it will be enabled.