Skip to content

Feature/copy to clipboard#48

Open
Shivam154CO wants to merge 5 commits intoTiwariDivya25:mainfrom
Shivam154CO:feature/copy-to-clipboard
Open

Feature/copy to clipboard#48
Shivam154CO wants to merge 5 commits intoTiwariDivya25:mainfrom
Shivam154CO:feature/copy-to-clipboard

Conversation

@Shivam154CO
Copy link

Description

Allow users to copy code snippets from posts with a single click.

Changes Made:

  • Detect pre/code blocks in posts using markdown-style parsing
  • Add reusable CopyButton component with 'Copied!' feedback
  • Create CodeBlock component with language detection
  • Update PostItem to show code snippet previews with copy option
  • Update PostDetail to render code blocks properly with copy buttons
  • Add 'Copy All Code' functionality for posts with multiple snippets
  • Add show/hide toggle for code blocks

Features:

  • 📋 Copy individual code snippets
  • 📋📋 Copy all code snippets at once
  • 👁️ Toggle between showing all code or inline view
  • 🏷️ Language detection for code blocks
  • ✅ Visual feedback with 'Copied!' message
  • ⏱️ Automatic reset after 2 seconds
  • 📱 Responsive design

Impact:

  • Better developer experience
  • Faster code reuse
  • Modern UX with visual feedback

Closes #32

@vercel
Copy link

vercel bot commented Jan 6, 2026

@Shivam154CO is attempting to deploy a commit to the Divya Tiwari's projects Team on Vercel.

A member of the Team first needs to authorize it.

@netlify
Copy link

netlify bot commented Jan 6, 2026

Deploy Preview for tiwaridivya25-devconnect failed.

Name Link
🔨 Latest commit 98eabe0
🔍 Latest deploy log https://app.netlify.com/projects/tiwaridivya25-devconnect/deploys/695e978d185049000852d311

@TiwariDivya25
Copy link
Owner

Resolve the merge conflicts before i can merge your PR.

@Shivam154CO
Copy link
Author

@TiwariDivya25 fixed

@Shivam154CO
Copy link
Author

@TiwariDivya25 fixed, now you can merge

@sharathlingam
Copy link
Collaborator

Your coding standard does not align with the coding standard of our project. Please rectify the errors in your PR and resubmit it.

PS: For your kind information please do not force or direct the project maintainers to merge your code :)

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.

Add “Copy to Clipboard” Button for Code Snippets

3 participants