[RTE] Toolbar Copy should copy the selection's serialized content, not its DOM
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Refactorización
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- javascript
- Área
- frontend
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
❌ 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.
- Lenguaje dominante
- Python
- Estrellas
- 191
- Forks
- 308
- Merge medio
- 2 d 17 h
- PR fusionados (30 d)
- 64
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de learningequality/studio
-
Set unpublishable: true on PublishedChange by construction to simplify handleMaxRevs predicateAbiertoDEV: frontend P3 - low
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
learningequality/studio#5868 ·
Los mantenedores suelen responder en 1 día
-
TAG: tech update / debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
learningequality/studio#2245 ·
Los mantenedores suelen responder en 1 día
-
bug DEV: frontend
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
learningequality/studio#6308 ·
Los mantenedores suelen responder en 1 día
-
bug DEV: frontend
Dificultad 3/5 1-2 días Aptitud para principiantes 20/100
learningequality/studio#6307 ·
Los mantenedores suelen responder en 1 día
-
bug DEV: backend python
Dificultad 3/5 1-2 días Aptitud para principiantes 30/100
learningequality/studio#6305 ·
Los mantenedores suelen responder en 1 día
Todos los issues de learningequality/studio
Issues similares
-
Broken link in index.rstAbiertodocumentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 65/100
ansys/pydpf-core#3547 ·
Los mantenedores suelen responder en 1 día
-
core
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
vectorize-io/hindsight#5457 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: LangChain drops OpenAI Responses text blocks from session recordingPosiblemente ocupada @ktz03 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
volcengine/OpenViking#5806 ·
Los mantenedores suelen responder en 1 día
-
HTML: <template> content is extracted as document textPosiblemente ocupada @ryanmeowy la tomó hoy. Abiertobug html
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
docling-project/docling#4714 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
APIv2 event data accepts a non-string reply and a NaN upper_boundPosiblemente ocupada @awss1i la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
freedomofpress/securedrop#7946 · 1 comentario ·
Los mantenedores suelen responder en 2 días