
❌ 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
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
AI usage
A reviewer asked for this follow-up on #6277; Claude Code drafted it from that review thread and the current handleCopy code.
❌ 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).copySourcespan holding its ownrenderHTMLoutput only so this Copy picks it up (InlineChoiceChip/index.vue).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
math-fieldspecial case inhandleCopyis gone.copySourcespan is gone.text/htmlon the clipboard for the same selection.AI usage
A reviewer asked for this follow-up on #6277; Claude Code drafted it from that review thread and the current
handleCopycode.