[RTE] Copying a formula as plain text leaves it out
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- javascript, typescript
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
❌ 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.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 214
- Forks
- 327
- Ø Merge
- 17 Std. 5 Min.
- Gemergte PRs (30 T.)
- 25
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus learningequality/studio
-
Community library status changes don't update `date_updated`Evtl. vergeben @ArpitaSamanta10 hat das vor 13 Tagen übernommen. Offencommunity-contribution-in-progress DEV: backend good first issue help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
learningequality/studio#6414 · 8 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Activation key can activate a different account whose email differs only in caseEvtl. vergeben @Madhu-priya123 hat das vor 5 Tagen übernommen. OffenDEV: backend
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
learningequality/studio#6410 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
DEV: backend
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
learningequality/studio#6409 ·
Maintainer antworten meist innerhalb von 1 Tag
-
DEV: backend
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
learningequality/studio#6407 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Stripe webhook accepts events when no webhook secret is configuredEvtl. vergeben @adibmbrk hat das vor 14 Tagen übernommen. Offencommunity-contribution-in-progress DEV: backend good first issue help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
learningequality/studio#6404 · 3 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in learningequality/studio
Ähnliche Issues
-
Add an OutageDeck provider status badge (/outagedeck/status/:provider)Evtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offenenhancement good first issue shields parity
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
seuthootDev/terminal-shields#125 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
[ui] 自創球員 (投手): pick 球種 at creation (直球 fixed + up to 2 more), trade-off line, shown on the cardOffenarea:ui P1 status:doing
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
sunososobro-hub/cloudball#1153 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
documentation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
NuSkooler/enigma-bbs#1241 ·
Maintainer antworten meist innerhalb von 1 Tag
-
harness seguranca target:staging
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
corosolto/client#1507 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag