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

fix "click to copy" not copying content #217

Merged
merged 2 commits into from
Jul 30, 2024
Merged

Conversation

bacongobbler
Copy link
Contributor

@bacongobbler bacongobbler commented Jul 30, 2024

Fixes ReferenceError: Cannot access 'copyCode' before initialization.

Also fixes the issue where "click to copy" was not being applied to the code block unless its parent had the data-plausible attribute applied.

@bacongobbler bacongobbler linked an issue Jul 30, 2024 that may be closed by this pull request
Copy link
Contributor

@vdice vdice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copying now works! 🎉

One thing we'll want to look at next: performing a snippet 'audit' to remove extra text that would prevent successful pasting/execution (like the $'s in https://spinkube.dev/docs/install/rancher-desktop/#step-4-deploying-your-application) -- or signaling that the snippet shouldn't be copy/paste-able (for instance maybe it shows command output and is meant to serve more as a reference).

@bacongobbler
Copy link
Contributor Author

I agree. I'd love to add that in a follow-up.

@bacongobbler
Copy link
Contributor Author

filed #220 to track that

@bacongobbler bacongobbler merged commit bb14ee6 into main Jul 30, 2024
1 check passed
@bacongobbler bacongobbler deleted the fix-216-copy-issues branch July 30, 2024 19:01
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.

Further 'copy to clipboard' issues
2 participants