Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Empty paragraphs are dropped on save – edit mode and view mode diverge

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

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ả

bug

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

  1. Open a page in Collectives (or a .md file in Text)
  2. Write a paragraph, press Enter 2–3 times, write another paragraph
  3. Leave edit mode / reload the page
  4. 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

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 nextcloud/text

Tất cả issue của nextcloud/text

Issue tương tự

Thêm issue về JavaScript

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.