[RTE] Copying a formula as plain text leaves it out
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 25/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- javascript, typescript
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
❌ 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.
- Langage dominant
- JavaScript
- Étoiles
- 214
- Forks
- 327
- Merge moyen
- 17 h 5 min
- PR mergées (30 j)
- 25
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de learningequality/studio
-
Community library status changes don't update `date_updated`Peut-être pris @ArpitaSamanta10 l’a pris il y a 13 jours. Ouvertecommunity-contribution-in-progress DEV: backend good first issue help wanted
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
learningequality/studio#6414 · 8 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Activation key can activate a different account whose email differs only in casePeut-être pris @Madhu-priya123 l’a pris il y a 5 jours. OuverteDEV: backend
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
learningequality/studio#6410 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
DEV: backend
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
learningequality/studio#6409 ·
Les mainteneurs répondent en général sous 1 jour
-
DEV: backend
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
learningequality/studio#6407 ·
Les mainteneurs répondent en général sous 1 jour
-
Stripe webhook accepts events when no webhook secret is configuredPeut-être pris @adibmbrk l’a pris il y a 14 jours. Ouvertecommunity-contribution-in-progress DEV: backend good first issue help wanted
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
learningequality/studio#6404 · 3 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de learningequality/studio
Issues similaires
-
Add an OutageDeck provider status badge (/outagedeck/status/:provider)Peut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverteenhancement good first issue shields parity
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
seuthootDev/terminal-shields#125 ·
Les mainteneurs répondent en général sous 2 jours
-
[ui] 自創球員 (投手): pick 球種 at creation (直球 fixed + up to 2 more), trade-off line, shown on the cardOuvertearea:ui P1 status:doing
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
sunososobro-hub/cloudball#1153 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour
-
documentation
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
NuSkooler/enigma-bbs#1241 ·
Les mainteneurs répondent en général sous 1 jour
-
harness seguranca target:staging
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
corosolto/client#1507 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour