code-syntax-block icon indicating copy to clipboard operation
code-syntax-block copied to clipboard

To add a copy code button in the top right corner

Open vikramaruchamy opened this issue 6 years ago • 7 comments

This would help users to copy the code with a single click and paste in their editor.

vikramaruchamy avatar Dec 23 '18 06:12 vikramaruchamy

+1, perhaps something like the code-box-copy plugin (example). I'm not sure how difficult it would be in React, but effectively it's just including the JS/CSS scripts, adding an extra class to the div and triggering it.

Thank you for the great plugin!

dmhendricks avatar Jan 01 '19 22:01 dmhendricks

+1 This feature will add an extra star to this plugin.

boospot avatar Oct 24 '19 12:10 boospot

I attempted to load up clipboard.js in my child theme before prism.js as explained here: https://prismjs.com/plugins/copy-to-clipboard/, but that doesn't seem to work with this plugin for some reason. The copy button is never generated. I confirmed the scripts were loading in the correct order, and I'm not 100% sure why it's not working, but maybe it's something that needs to be done in the plugin?

NatalieMac avatar Aug 20 '20 18:08 NatalieMac

@mkaz Any updates on this feature?

vishnumaiea avatar Sep 18 '21 10:09 vishnumaiea

I'm using this plugin for now, but I agree it would be great to have this directly in this plugin

fharper avatar Nov 11 '21 17:11 fharper

+1,it would be perfect if the copy button is added.like this image

zenonux avatar Dec 06 '21 07:12 zenonux

Is there any update? I would highly appreciate if that could be included

selimovd avatar Feb 15 '23 22:02 selimovd