Configurable drag'n'drop preview container in `SideMenuPlugin`

Aperta
#1,685 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
react, typescript
Ambito
frontend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug:P4

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 💖

Lingua principale
TypeScript
Stelle
10.2k
Fork
772
Merge medio
3g 11h
PR unite (30g)
17

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di TypeCellOS/BlockNote

Tutte le issue di TypeCellOS/BlockNote

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.