[RTE] Toolbar Copy should copy the selection's serialized content, not its DOM
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- リファクタリング
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript
- 領域
- frontend
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
❌ 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.
- 主要言語
- Python
- スター
- 191
- フォーク
- 308
- 平均マージ
- 2日 17時間
- マージ済み PR(30日)
- 64
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
learningequality/studio のほかの issue
-
DEV: frontend P3 - low
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
learningequality/studio#5868 ·
メンテナーはふだん 1 日以内に返信
-
TAG: tech update / debt
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
learningequality/studio#2245 ·
メンテナーはふだん 1 日以内に返信
-
bug DEV: frontend
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
learningequality/studio#6308 ·
メンテナーはふだん 1 日以内に返信
-
bug DEV: frontend
難易度 3/5 1〜2日 初心者へのやさしさ 20/100
learningequality/studio#6307 ·
メンテナーはふだん 1 日以内に返信
-
bug DEV: backend python
難易度 3/5 1〜2日 初心者へのやさしさ 30/100
learningequality/studio#6305 ·
メンテナーはふだん 1 日以内に返信
learningequality/studio の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
SR_SECURITY_DESCRIPTOR.fromString drops the SACL when no DACL is present対応中かも @paul7436 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
equinor/fmu-sumo-uploader#302 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
modelscope/evalscope#1821 ·
メンテナーはふだん 1 日以内に返信
-
Sanity on ansible-core devel fails: ignore-2.23.txt references the removed import-3.9 test対応中かも @yurnov が今日担当しました。 オープンneeds_triage
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
ansible-collections/kubernetes.core#1275 ·
メンテナーはふだん 1 日以内に返信