Skip to content
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 specify the HTML of a dropped element? #700

Closed
electrotype opened this issue Nov 19, 2022 · 0 comments
Closed

How to specify the HTML of a dropped element? #700

electrotype opened this issue Nov 19, 2022 · 0 comments

Comments

@electrotype
Copy link

I'm new to Dragula. I'm trying to use this library instead of a more complex one.

One of my need is to be able to specify the HTML of an element that is "copied": I have a list of elements (each element of the list is a complex li) and below this list is a "+ element" button. I want to be able to drag the "+" button and, when dropped in the list, a new li element to be created.

How do I specify the HTML to use for the dropped element? Do I have to use the drop event and replace the dropped element (which is a simple button in my case!) by the required li HTML?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant