Opened 9 years ago
Closed 9 years ago
#29733 closed defect (bug) (duplicate)
Unable to insert image using drag-and-drop on custom wp_editor
Reported by: | aduth | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.0 |
Component: | Editor | Keywords: | has-patch dev-feedback |
Focuses: | javascript | Cc: |
Description
Steps to reproduce:
1) Create a page with an instance of wp_editor using a non-standard ID (i.e. anything other than "content")
2) When viewing the page, drag and drop an image into editor (on fresh page reload, not having opened media library prior to dragging)
3) Click "Insert into post"
Expected outcome:
Uploaded image is inserted into post
Actual outcome:
Uploaded image is not inserted into post
Cause:
The "drop" event handler creates a new "workflow" instance if one does not already exist using a hard-coded "content" ID despite the custom ID being used.
Attachments (1)
Change History (4)
#1
@
9 years ago
- Component changed from Media to Editor
- Keywords has-patch needs-testing added
- Version changed from trunk to 4.0
#2
@
9 years ago
- Keywords dev-feedback added; needs-testing removed
I've tested patch drag-drop-custom-editor-fix.diff
against trunk
and it does solve the issue. To verify I created a post with a non standard wp_editor()
and attempted to add an image via drag and drop. That image was inserted into the content after clicking "Insert into post" instead of my custom editor. After applying the patch the image was correctly inserted into the non standard editor. Problem solved.
Cheers,
Derek
Resolution