-
Notifications
You must be signed in to change notification settings - Fork 11
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 a copy link in the code on the front end #192
Comments
I'd want this feature to also be available in AMP. That is blocked by ampproject/amphtml#4853. |
waky wakyyy |
We're awake, @studentcoinbonuscode. There's nothing this project can do as this feature is still blocked by the AMP spec. |
Work is underway on an |
I also would like to see a copy button on the front end. |
Any updates? |
No updates. I am not sure that the Since this feature would be adding something, it would probably need to have a global setting to enable (in Customizer?). I suppose there would also need to be a block-level setting as well, so you can enable it on a per-block basis. We'd also need to work out the default styling of the copy button. |
Will this still get implemented? |
Still would like to. Haven't been able to get to it. In regards to the setting for whether globally enable a copy button across all blocks by default, using the Customizer wouldn't be appropriate anymore since its usage is declining now with the Site Editor. |
Cant we use custom php code snippets for that? I mean that is how you configure this plugin, right? |
I mean, you can add a plugin that extends this plugin with a copy button, for sure. |
I created a proof of concept extension plugin that adds a Copy button after every code block: https://gist.github.com/westonruter/d99067473ad799deb099334a70bdf336 |
This issue is inspired by a tweet from John Blackbourn
https://twitter.com/johnbillion/status/1316336593180012545?s=20
So you can blame him for it 😂
I remember that in Theme Sniffer we had a clipboard icon next to the sniff errors for easier copying
https://www.npmjs.com/package/clipboard
https://github.com/WPTT/theme-sniffer/blob/3aadb8c1ed64220684050bf09a7fb846bfdd2b54/assets/dev/scripts/theme-sniffer.js#L125
Something like that could work here 🤷♂️
The text was updated successfully, but these errors were encountered: