AppFlowy-IO / AppFlowy-IO/appflowy-editor

[Bug] Bullet and numbered lists display spaces and placeholder text if no content exists, but include child nodes

Đang mở
#802 0 bình luận 3 reaction 0 người được giao Xem trên GitHub
p0
Ngôn ngữ chính
Dart
Star
684
Fork
329
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### Bug Description

Bullet and numbered lists are not rendered correctly if a list element doesn't contain any content but contains child nodes like a paragraph.

If no bullet or numbered list content exists, an empty space and a placeholder text will be displayed:
![image](https://github.com/AppFlowy-IO/appflowy-editor/assets/4848555/0aa4260b-2493-4c35-bbb1-918ca19e1d78)

### How to Reproduce

Following minimal HTML produces a document which will be rendered as explained above:

```dart
htmlToDocument('

  1. test

')
```

Extended example (used for the screenshot):

```dart
htmlToDocument('

  1. ol Line 1

    ol Line 2

  2. ol Line 3

    ol Line 4

  • ul Line 1

    ul Line 2

  • ul Line 3

    ul Line 4

')
```

This can be reproduced by replacing the HTML string at https://github.com/AppFlowy-IO/appflowy-editor/blob/796d1249fe5a7f936cb9060208561c45db484098/example/lib/home_page.dart#L143.

### Expected Behavior

No empty space and no placeholder text should be displayed in this case.
The nested content should move up to be aligned with the bullet symbol:

![image](https://github.com/AppFlowy-IO/appflowy-editor/assets/4848555/23cbdd9b-d4bd-4afd-a465-93ba5e71fde6)

Maybe only in `editable: false` mode?

### Operating System

iOS (simulator)

### AppFlowy Editor Version(s)

2.4.0

### Screenshots

_No response_

### Additional Context

_No response_

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

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

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.