Programatically registering drag events? #1258
Unanswered
BrianMagus
asked this question in
Q&A
Replies: 1 comment
-
Is there no means to do this? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Okay so bear with me, but I'm trying to figure out if I can rig up a small extension to my implementation of dnd kit.
So, I'm using TipTap editor as the text editor in my app, and I'm able to register the text drag event and capture the text being dragged by putting an onDragStart listener on the editor's container and grabbing the window.getSelect().toString() text. Part one mostly solved.
Now, the whole app is wrapped in a DndProvider specifically so that I can be liberal with where and how I implement dnd behavior, what gets dropped on what and what happens. Dnd interactions are everywhere. And what I would like to do is be able to drag text over a droppable set up to recieve a 'note' draggable, and upon dropping it there handle making a new note out of the dropped text.
I'm wondering if there is a way for me to set the active object when I start dragging this text. something like 'setActive', etc. The documentation doesn't mention anything about it as far as I can tell, but is there something that maybe happens under the hood that I might access? I envision something like setting active to {id: someId, data: {type: note, text: captured-text-here}}. Is that something accessible or is that kept boxed specifically so we don't go poking around where we might break something?
Beta Was this translation helpful? Give feedback.
All reactions