NiclasDev63 / tiptap-extension-global-drag-handle

MIT License
45 stars 6 forks source link

Allows custom drag handles to be specified #10

Closed chanthus closed 2 months ago

chanthus commented 2 months ago

https://github.com/NiclasDev63/tiptap-extension-global-drag-handle/issues/7

Added a new dragHandleSelector option. When specified, instead of creating the drag handle, the plugin uses the element found when applying the query selector as the drag handle.

NiclasDev63 commented 2 months ago

Can you provide a working example of this feature ?

chanthus commented 2 months ago

Extension usage:

GlobalDragHandle.configure({
    dragHandleWidth: 22,
    scrollThreshold: 0,
    dragHandleSelector: "#custom-drag-handle"
})

A custom html element to be used as the handle

<div id="custom-drag-handle"></div>
NiclasDev63 commented 2 months ago

I have just tested it and everything seems to work fine. Can you make sure that you are using the latest version, I have seen that your fork is still at version 1.4 and we are already at 1.7. It would also be good if you could add your feature to the documentation

chanthus commented 2 months ago

Updated the readme and merged lastest master in as well