Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Copy Button to Code Blocks #49

Open
yntpdotme opened this issue Feb 20, 2025 · 0 comments
Open

Add Copy Button to Code Blocks #49

yntpdotme opened this issue Feb 20, 2025 · 0 comments

Comments

@yntpdotme
Copy link

The Code component currently lacks a built-in copy button functionality for code blocks, which is a common and useful feature in code highlighting components.

Current Behaviour

  • Code blocks are rendered with syntax highlighting and line numbers
  • No native way to copy code contents to clipboard

Requested Feature

Add a built-in copy button functionality that:

  • Appears on hover (or permanently) in the top-right corner of code blocks
  • Copies the raw code content (without line numbers) to clipboard
  • Provides visual feedback on copy success
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

No branches or pull requests

1 participant