NiclasDev63 / tiptap-extension-global-drag-handle

MIT License
68 stars 11 forks source link

When i drag and drop a table its duplicating. #18

Open Allylk opened 2 months ago

Allylk commented 2 months ago

if i drag and drop a table its getting duplicated instead of moving. is there a way to fix this? My configuration below

GlobalDragHandle.configure({
        GlobalDragHandle,
        AutoJoiner,
        scrollTreshold: 0,
      }),

i also tried without AutoJoiner. any help would be apricated.

NiclasDev63 commented 2 months ago

You added the drag handle and the auto joiner extension to the drag handle configuration, which wont work. You need to add both to your tiptap extensions. It would also be helpful to see your table configuration

Allylk commented 2 months ago

its just normal tables

 Table.configure({
        resizable: true,
  }),  TableRow, TableHeader, TableCell

could u show me how to add the code separately? Thanks.

NiclasDev63 commented 2 months ago

you need to set the allowTableNodeSelection option to true, in order to make the complete table selectable. If you still not sure how to do it, have a look at the docs

Allylk commented 2 months ago

That worked. thank you very much.