-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Added copy button #2279
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
Merged
thecrypticace
merged 19 commits into
tailwindlabs:main
from
rozsazoltan:added-copy-button
Sep 2, 2025
Merged
Added copy button #2279
thecrypticace
merged 19 commits into
tailwindlabs:main
from
rozsazoltan:added-copy-button
Sep 2, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for GitHub.
|
rozsazoltan
commented
Jun 16, 2025
rozsazoltan
commented
Jun 16, 2025
rozsazoltan
commented
Jun 16, 2025
rozsazoltan
commented
Jun 16, 2025
This was referenced Jul 8, 2025
Closed
little update: We're gonna design a custom icon for the copy button and maybe switch to a "copied" tooltip kinda like we had in the v3 docs but not 100% sure yet. Likely will get things updated and merged sometime next week. |
Is this really necessary? No. But it is fun :D
These are common on blog posts and a few guide pages but not the installation page
This reverts commit deeb7c0.
These are no longer necessary
1c23be0
to
e342f01
Compare
RobinMalfait
approved these changes
Aug 27, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #2271
I know there are already a few active PRs (#2222, #2278), but each of them got stuck at some point for various reasons and tries to filter out Shiki comments using different logic.
Since there are multiple PRs, I'm not sure which one I should prioritize. I like the icons in the first PR, but I would also animate them using CSS. I think the second PR mainly tries to outperform the first one - unsuccessfully - and gets stuck with CSS examples or handling diffs.
There are several issues to address:
For my part, I'm currently using the code shared in this PR - it seems to be working so far:
highlight
,word
, and other expressions properlyI'm not convinced that this is the best solution to the problem - that's why I hesitated to share it earlier.