I’ve successfully implemented a drag-and-drop feature using data-drag-handle
, but I’m facing an issue. I want to restrict the dragging and dropping of blocks to within their respective sections. In other words, I want to prevent blocks from being dragged from one section to another.
Blocks and Sections are custom nodes.
This is my editor:
Here’s the current setup:
- I have an editor with multiple custom sections.
- Each custom section contains custom Tiptap blocks.
I want to achieve the following behavior:
- Custom blocks in Section 1 should only be draggable within Section 1.
- Custom blocks in Section 2 should only be draggable within Section 2.
- Custom blocks should not be allowed to move between sections.
Any assistance would be greatly appreciated. Thank you!