Skip to content

feat: add "Copy Page" button to markdown docs#1080

Draft
claycurry wants to merge 1 commit intoelectron:mainfrom
claycurry:main
Draft

feat: add "Copy Page" button to markdown docs#1080
claycurry wants to merge 1 commit intoelectron:mainfrom
claycurry:main

Conversation

@claycurry
Copy link
Copy Markdown

@claycurry claycurry commented Apr 11, 2026

NOTE:

PR description is being finalized. The last draft uncovered new information, which spawned a separate thread I have yet to close.

I reach out directly to core contributors + community members once this PR is ready for review.

ETA: 4/14 EOD

- defines an extensible "Copy Page" remark plugin for injecting a clickable action for transferring rendered *.md content from the DOM to the clipboard.

- adds docusaurus configuration for integrating the plugin with the existing unified / remark *.md render pipeline - giving itself the second lowest execution precedence

- crafts an intuitive UX that composes recognizable icons, interaction patterns, color tokens, button variants, and idiomatic styling encountered throughout the industry

- verifies the button copies the raw markdown (with frontmatter) to the clipboard using navigator.clipboard with an execCommand fallback, and flips to a "Copied" state for 2s.
@claycurry claycurry marked this pull request as ready for review April 11, 2026 13:59
@claycurry claycurry requested a review from a team as a code owner April 11, 2026 13:59
@claycurry claycurry changed the title feature request: add "Copy Page" button for markdown docs feat: add "Copy Page" button for markdown docs Apr 11, 2026
@claycurry claycurry changed the title feat: add "Copy Page" button for markdown docs feat: add "Copy Page" button to markdown docs Apr 11, 2026
@claycurry
Copy link
Copy Markdown
Author

claycurry commented Apr 11, 2026

more context on this topic is available at the Docusaurus project under at least 2 open issues:

(11333) & (10899)

@claycurry claycurry marked this pull request as draft April 13, 2026 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant