[RTE] Copying a formula as plain text leaves it out
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- javascript, typescript
調査の方向性
Start with Math.js and useToolbarActions.js, then trace how TipTap serializes selections for text/plain and how toolbar Copy builds clipboard data. Check the existing Jest tests and add coverage for both copy paths, unchanged text/html, and typing a space after a formula beginning with -. Done means all acceptance criteria pass; the issue says the formula’s plain text representation is still undecided.
索引モデルが issue の本文から書いたものです。
説明
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Target branch: unstable
Observed behavior
- Copying a selection that spans a formula puts no text for the formula in
text/plain:A, the formula\frac{x}{y},Bcopies asAB. - Ctrl+C and the toolbar's Copy both do this. The formula node defines no text (Math.js#L5-L49), and toolbar Copy reads
textBetween(useToolbarActions.js#L127). text/htmlholds the formula, so pasting into another rich text editor keeps it.- The fix for #6309 keeps formulas imported as MathML as formula nodes, so they copy the same way.
Expected behavior
text/plain holds each formula the selection spans. Which text stands for a formula is undecided, and the rich text editor's maintainers choose: its LaTeX (\frac{x}{y}), the $$\frac{x}{y}$$ the editor writes in Markdown, or the \(\frac{x}{y}\) toolbar Copy writes into its HTML.
User-facing consequences
An author who pastes question text into a plain-text field (a title, a search box, a chat message) gets the sentence with its formulas missing, and nothing marks the gaps.
Steps to reproduce
- Create an editor with
editorExtensions()and the content<p>A<span data-latex="\frac{x}{y}"></span>B</p>. - Run
editor.commands.selectAll(). - Read
editor.view.serializeForClipboard(editor.state.selection.content()).text: it isAB. - Read
editor.state.doc.textBetween(1, 4, '\n'): it isAB.
Context
unstable at 2713cbf33, Jest with jsdom.
Acceptance Criteria
- Ctrl+C on
A, the formula\frac{x}{y},Bputs the chosen text for the formula betweenAandBintext/plain. - Toolbar Copy puts the same
text/plainon the clipboard for that selection. -
text/htmlfor that selection is what it was before the change. - A formula whose text starts with
-, at the start of a paragraph, does not become a list when a space is typed after it. TipTap's typing shortcuts read a node's text throughrenderText(InlineChoiceNode.js#L159-L161). - Unit tests cover each criterion above.
AI usage
Claude Code found this while working on #6309, reproduced both copy paths with Jest on unstable, and drafted this issue.
- 主要言語
- JavaScript
- スター
- 214
- フォーク
- 327
- 平均マージ
- 17時間 5分
- マージ済み PR(30日)
- 25
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
learningequality/studio のほかの issue
-
Community library status changes don't update `date_updated`対応中かも @ArpitaSamanta10 が 13 日前に担当しました。 オープンcommunity-contribution-in-progress DEV: backend good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
learningequality/studio#6414 · コメント 8 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Activation key can activate a different account whose email differs only in case対応中かも @Madhu-priya123 が 4 日前に担当しました。 オープンDEV: backend
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
learningequality/studio#6410 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
DEV: backend
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
learningequality/studio#6409 ·
メンテナーはふだん 1 日以内に返信
-
DEV: backend
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
learningequality/studio#6407 ·
メンテナーはふだん 1 日以内に返信
-
Stripe webhook accepts events when no webhook secret is configured対応中かも @adibmbrk が 14 日前に担当しました。 オープンcommunity-contribution-in-progress DEV: backend good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
learningequality/studio#6404 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
learningequality/studio の issue をすべて見る
似ている issue
-
enhancement good first issue shields parity
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
seuthootDev/terminal-shields#125 ·
メンテナーはふだん 2 日以内に返信
-
[ui] 自創球員 (投手): pick 球種 at creation (直球 fixed + up to 2 more), trade-off line, shown on the cardオープンarea:ui P1 status:doing
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
sunososobro-hub/cloudball#1153 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
NuSkooler/enigma-bbs#1241 ·
メンテナーはふだん 1 日以内に返信
-
harness seguranca target:staging
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
corosolto/client#1507 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信