[RTE] Copying a formula as plain text leaves it out
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, typescript
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
❌ 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.
- Lingua principale
- JavaScript
- Stelle
- 214
- Fork
- 327
- Merge medio
- 17h 5m
- PR unite (30g)
- 25
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di learningequality/studio
-
Community library status changes don't update `date_updated`Forse già presa @ArpitaSamanta10 l’ha presa 13 giorni fa. Apertacommunity-contribution-in-progress DEV: backend good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
learningequality/studio#6414 · 8 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Activation key can activate a different account whose email differs only in caseForse già presa @Madhu-priya123 l’ha presa 4 giorni fa. ApertaDEV: backend
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
learningequality/studio#6410 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
DEV: backend
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
learningequality/studio#6409 ·
I maintainer di solito rispondono entro 1 giorno
-
DEV: backend
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
learningequality/studio#6407 ·
I maintainer di solito rispondono entro 1 giorno
-
Stripe webhook accepts events when no webhook secret is configuredForse già presa @adibmbrk l’ha presa 14 giorni fa. Apertacommunity-contribution-in-progress DEV: backend good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
learningequality/studio#6404 · 3 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di learningequality/studio
Issue simili
-
enhancement good first issue shields parity
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
seuthootDev/terminal-shields#125 ·
I maintainer di solito rispondono entro 2 giorni
-
[ui] 自創球員 (投手): pick 球種 at creation (直球 fixed + up to 2 more), trade-off line, shown on the cardApertaarea:ui P1 status:doing
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
sunososobro-hub/cloudball#1153 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
NuSkooler/enigma-bbs#1241 ·
I maintainer di solito rispondono entro 1 giorno
-
harness seguranca target:staging
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
corosolto/client#1507 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno