You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#116960 Is there a simple way to provide a copy-to-clipboard button in code snippets?

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by Ryan on Friday, 06 December 2024 09:21 GMT

pmarini

Hello,

I'd like to add a copy-to-clipboard button in my blog posts that include code snippets.

Is there a simple way to do it with JCE?

Thanks

Attachments

Ryan

I'd like to add a copy-to-clipboard button in my blog posts that include code snippets.

Is there a simple way to do it with JCE?

No there isn't currently a simple way to do this, but I am adding the option to the CodeSample plugin - https://www.joomlacontenteditor.net/downloads/plugins/editor/code-sample

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

pmarini

Thanks for the reply! Great! Do you mean you'll add it in a future version of CodeSample?

Ryan

Yes I have started adding it already, it is a plugin of the Prism library which Code Sample uses - https://prismjs.com/plugins/copy-to-clipboard

Might have a beta available for testing next week.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

pmarini

Hello, any news on this development? Looking forward to beta-test it!

Ryan

Initial work on this has provided mixed results, mainly due to the styling of the Copy button, which is unattractive and difficult to override.

I am continuing to work on it, and will post an update when I have reasonable solution.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.