KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I need to copy an image to clipboard using JavaScript/jquery and I am using the following js to achieve that. function copyImageToClipBoard() { var div = document.getElementById('chart1'); div.contentEditable = true; var controlRange; if (document.body.createControlRange) { controlRange = document.body.createControlRange(); controlRange.addElement(div); controlRange.execCommand('Copy'); } div.contentEditable = false; } It works fine locally in IE. But when I tried to test it from other machines IE, to paste the image into MS word I need to use the Paste Special-> Device Independent Bitmap option, otherwise I cannot see the image pasted. I was wondering if it has anything to do with the environment of the m/c. If so is there any other option which works anywhere?
Tags (comma-separated)
Save Edits
Cancel