When dragging multiple file types to the editor canvas, detect and insert Image, Video, or File blocks as appropriate #65074
Labels
[Block] File
Affects the File Block
[Block] Image
Affects the Image Block
[Block] Video
Affects the Video Block
[Feature] Drag and Drop
Drag and drop functionality when working with blocks
[Status] In Progress
Tracking issues with work in progress
[Type] Enhancement
A suggestion for improvement.
What problem does this address?
Based on discussion in #65030 and related to #64795, when a user drags a mix of file types to the editor canvas or onto an empty Paragraph block, we currently insert all the blocks as File blocks, and a warning about the Gallery block displays:
What is your proposed solution?
Instead, as suggested by @swissspidy, let's iterate over the files being dragged, and if there's an image or a video, create the appropriate blocks. Pascal as already implemented a solution for this in the media experiments plugin, so that approach could be borrowed. See: #65030 (comment)
The text was updated successfully, but these errors were encountered: