steven-tey / novel

Notion-style WYSIWYG editor with AI-powered autocompletion.
https://novel.sh
Apache License 2.0
12.21k stars 1.02k forks source link

feat: auto scroll when dragging #341

Open andrewdoro opened 5 months ago

andrewdoro commented 5 months ago

Describe the feature you'd like to request

Implement auto scroll when dragging. Currently dragging in based on the native HTML integration.

https://github.com/steven-tey/novel/assets/17547035/2462a10d-ade9-4f05-870d-2bdb7ce2c669

Added this PR for an example implementation but I am not confident is a good solution #340

Describe the solution you'd like to see

I've seen this solution in dnd-kit but needs to be adpated for our use case with Tiptap: https://github.com/clauderic/dnd-kit/blob/694dcc2f62e5269541fc941fa6c9af46ccd682ad/packages/core/src/hooks/utilities/useAutoScroller.ts#L4

Additional information

No response