I know it’s possible to prevent ctrl+c from working on websites with jQuery. So this led me to think that maybe it is possible to pause or interrupt the process so you can focus and highlight some text, and then let it continue.
The idea would be to specify what is sent to the clipboard when ctrl+c is pressed. So the flow would be:
- User presses ctrl+c.
- jQuery intercepts the key press.
- jQuery adds and then highlights some text on the page.
- jQuery then lets the ctrl+c process continue so the highlighted text is now copied.
Sound possible?
Thanks for all the comments. In the end I chose to have a button click open a light box containing the html to be copied, and then automatically highlights it. The user then just has to hit ctrl+c. The following is the code I found to do this, it highlights everything within the specified element, images, links, text etc..
Thanks