NiclasDev63 / tiptap-extension-global-drag-handle

MIT License
73 stars 13 forks source link

Callback function for when item is dragged or dropped #21

Open codepeach opened 1 month ago

codepeach commented 1 month ago

Is the currently a way that I can run a function when an item is being dropped in a new position?

NiclasDev63 commented 1 month ago

not yet, but it shouldn't be too difficult to implement. You can simply extend the ‘handleDragStart’ function to store the initial position of the node and then check within the ‘drop’ function to see if the position has changed and implement your desired logic accordingly