TypeCellOS / TypeCellOS/BlockNote
Configurable drag'n'drop preview container in `SideMenuPlugin`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 10.2k
- Forks
- 772
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 17
Description
Is your feature request related to a problem? Please describe.
My Custom Blocks rely on CSS variables from their parent nodes. That means that when I use the drag handle to drag and drop them I lose styling properties and drag and drop preview doesn't look good.
Describe the solution you'd like
A configurable option to specify the selector for the parent of the drag and drop preview. The SideMenuController seems like a good place for it. I could take a stab at implementing it.
Describe alternatives you've considered
An alternative is for me to rewrite my app in a way that does not rely on CSS variables set up the DOM tree. I'd rather not do that.
Additional context
As you can see in the video, button's text color and background are part of the theme specified on the Editor's parent. The dragged button loses it's styles.
https://github.com/user-attachments/assets/dbb6eb2b-16da-426e-a2db-54cce9231fb1
Bonus
[ ] I'm a sponsor and would appreciate if you could look into this sooner than later 💖
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the SideMenuPlugin and SideMenuController entry points to see how the drag-and-drop preview container is selected. Trace the preview creation path and determine how a configurable parent selector could preserve CSS variables from the editor's DOM tree. Done means callers can configure the selector and the dragged preview retains the relevant styling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100