Headings not available in block type select dropdown when using `createHeadingBlockSpec`

Đang mở
#2,347 1 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
45/100
Loại issue
Lỗi
Độ 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 with the configuring default blocks example and compare its block type dropdown with the basic BlockNote example. Read the createHeadingBlockSpec configuration and trace how allowToggleHeadings and levels affect the dropdown. Done means custom heading configurations show the permitted heading options and filter out disallowed levels.

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

Mô tả

bug:P4

Describe the bug
Usually, when highlighting text in a paragraph block, you are able to change the block type to a heading. When using custom heading config using createHeadingBlockSpec, the option to convert to a heading disappears.

To Reproduce
Expected behaviour:

Image

Broken behaviour:

Image

Misc

Minimal example: https://stackblitz.com/edit/github-xbcndn1l?file=src%2FApp.tsx

It seems that in the dropdown:

  • The headings all disappear if you specify allowToggleHeadings: true
  • The headings will not be filtered if levels: [1, 2, 3] is specified (i.e. you can convert to heading 6)
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.