[RTE] Toolbar Copy should copy the selection's serialized content, not its DOM
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
- 45/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript
- Lĩnh vực
- frontend
Hướng nghiên cứu
Start at handleCopy in contentcuration/contentcuration/frontend/shared/views/TipTapEditor/TipTapEditor/composables/useToolbarActions.js (L113-L186), which clones the selection DOM today; replace it with editor.view.serializeForClipboard(selection.content()). Then remove the math-field special case there and the hidden copySource span in TipTapEditor node views like InlineChoiceChip/index.vue. Done means Toolbar Copy and Ctrl+C emit identical text/html, plus unit tests covering copy of a formula and a chip. Note the issue header states it is not open for contribution yet.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Overview
The rich text editor's toolbar Copy button builds its HTML by cloning the selection's DOM, so every node view that holds data must special-case itself to copy correctly. Copy should produce the same HTML as ProseMirror's own clipboard serializer, the one Ctrl+C uses.
Complexity: Low
Target branch: unstable
Context
handleCopycloneswindow.getSelection()'s range and patches it:<math-field>becomes amath-inlinespan,data-copy-ignoreelements and Vue attributes are stripped,math-node-wrapperdivs are unwrapped (useToolbarActions.js#L113-L186).- The inline choice chip in #6277 keeps a hidden
copySourcespan holding its ownrenderHTMLoutput only so this Copy picks it up (InlineChoiceChip/index.vue). - Raised in review of #6277.
The Change
Toolbar Copy should write the HTML ProseMirror serializes for the selection (editor.view.serializeForClipboard(selection.content())), so a node view's DOM no longer decides what is copied.
Acceptance Criteria
- Toolbar Copy then paste of a selection containing a formula reproduces the formula.
- Toolbar Copy then paste of a selection containing an inline choice chip reproduces the chip with its options and correct answer.
- The
math-fieldspecial case inhandleCopyis gone. - The inline choice chip's hidden
copySourcespan is gone. - Toolbar Copy and Ctrl+C put the same
text/htmlon the clipboard for the same selection. - Unit tests cover toolbar Copy of a selection with a formula and with a chip.
AI usage
A reviewer asked for this follow-up on #6277; Claude Code drafted it from that review thread and the current handleCopy code.
- Ngôn ngữ chính
- Python
- Star
- 192
- Fork
- 310
- Merge trung bình
- 2 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 67
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không 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 learningequality/studio
-
Set unpublishable: true on PublishedChange by construction to simplify handleMaxRevs predicateĐang mởDEV: frontend P3 - low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
learningequality/studio#5868 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
TAG: tech update / debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
learningequality/studio#2245 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug DEV: frontend P0 - critical
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 22/100
learningequality/studio#6316 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 35/100
learningequality/studio#6315 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 25/100
learningequality/studio#6314 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của learningequality/studio
Issue tương tự
-
`LazyFrameRemote` and `ExecuteRemote` sinks do not accept `Path`, like `LazyFrame` sinks do.Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/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 74/100
WingedGuardian/GENesis-AGI#3375 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
curriculum documentation quality
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
githubnext/gh-aw-workshop#4601 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
approved Good First Issue scope: docs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
hiero-ledger/hiero-sdk-python#2730 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày