Empty paragraphs are dropped on save – edit mode and view mode diverge
Maintainer thường phản hồi trong vòng 1 ngày
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
- 70/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript, markdown
- Lĩnh vực
- documentation, frontend
Hướng nghiên cứu
The issue is in the markdown serialization/parsing logic of the Text app, likely in the tiptap/prosemirror integration. Look for the code that converts the editor's document model to markdown and back. The solution involves modifying the serializer to represent empty paragraphs with and ensuring the parser correctly interprets them. Check existing tests for markdown handling to understand the current behavior and add a test for empty paragraph preservation.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
When pressing Enter to create empty lines (empty paragraphs) in edit mode, they are shown correctly while editing. After leaving edit mode, all empty paragraphs are gone in the
rendered view. This makes it very hard to structure pages
in Collectives, e.g. meeting notes with visual spacing between dated sections.
To Reproduce
- Open a page in Collectives (or a .md file in Text)
- Write a paragraph, press Enter 2–3 times, write another paragraph
- Leave edit mode / reload the page
- The empty lines are gone
Expected behavior
Empty paragraphs survive the markdown round trip, so edit and view mode look the same.
Cause
An empty paragraph serializes to the same \n\n as a regular paragraph separator,
so it is lost when converting to markdown and parsing it again.
Possible solution
Serialize empty paragraphs as (and parse a paragraph containing only
back into an empty paragraph), similar to what tiptap does in
ueberdosis/tiptap#8356 for empty paragraphs next to lists.
Related
- #902 (same behaviour, closed as duplicate of #593)
- #593 (closed as not planned, but covers preserving external formatting,
not empty paragraphs created in Text itself)
Server details
- Collectives: 4.6.1
- Text: 8.0.0
- Nextcloud: 34.0.4
- Ngôn ngữ chính
- JavaScript
- Star
- 665
- Fork
- 133
- Merge trung bình
- 1 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 172
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của nextcloud/text
-
0. Needs triage bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
nextcloud/text#9482 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
0. Needs triage bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
folder description not shows when using folder tree to navigateCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởbug feature: folder description
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
1. to develop design call discuss discussion ux
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
nextcloud/text#9334 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của nextcloud/text
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
-
tech-debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
srikanth235/centraid#1155 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
microsoft/monaco-editor#5563 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Package downloads never retry: getUrlWithResuming's retry catch cannot see a rejected requestĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày