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

Đang mở
#1,685 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
react, typescript
Lĩnh vực
frontend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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 💖

Ngôn ngữ chính
TypeScript
Star
10.2k
Fork
772
Merge trung bình
3 ngày 11 giờ
Pull request đã merge (30 ngày)
17

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của TypeCellOS/BlockNote

Tất cả issue của TypeCellOS/BlockNote

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.