-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to drag and drop into iFrame ? #189
Comments
Hey @Wikiki , thanks for bringing this up, as it's definitely something we want to have support for! I could imagine the API to look something like this: const sortable = new Sortable(insideCurrentFrameContainers);
// waits for iframe to finish loading
iframeElement.addEventListener('load', () => {
// assumes same origin and finds containers within the iframe
const iframeContainer = iframeElement.contentDocument.querySelector('.IframeContainer');
// adds iframe container
sortable.addContainer(iframeContainer);
// tells draggable to add listeners to the iframes window too
sortable.setOptions({hosts: [window, iframeContainer.contentWindow]})
}); Requirement
Missing API
I'll add it to draggables roadmap, because this could be a common use-case 👍 Let me know what you think of the proposed API |
Related issue: #153 |
@tsov This is the most important feauture for me. Described API looks very cool. I'm looking forward to the implementation. Thank you! |
Quick update: #202 Got a super dirty & quick version of it ready, but it proves that it's doable. The API as originally proposed has changed though: new Draggable(containers: HTMLElement[], options: DraggableOptions, hosts: DocumentOrShadowRoot[])
draggable.addHost(host: DocumentOrShadowRoot);
draggable.removeHost(host: DocumentOrShadowRoot);
The PR that is open at the moment only works for the |
@tsov, thanks for your answer. I'm looking forward for the implementation. |
hello was this ever implemented, i require the same for similar uses. thanks |
Any update for this issue? Thanks. |
Hi,
I'm trying to create a "builder tool" using this library but I'm facing an issue:
How can I manage this to be able to make my iFrame droppable and receiving the dragged elements ?
regards
The text was updated successfully, but these errors were encountered: