copy base64 image to clipboard

265 views
Skip to first unread message

artem....@logicify.com

unread,
Nov 14, 2014, 10:14:23 AM11/14/14
to extension...@chromium.org
i need copy to clipboard some image, and then paste into powerpoint. For external images i can do it, fro example:
<img src="http://www.mysite.com/image1.png"/>
document.execCommand('copy') works fine
but if i try copy image like this
<img src="data:image/png;base64,image data here..."/>
or
i try set src by jquery
$('#myimage').attr('src',chrome.extension.getURL('/images/image1.png'));
in background.html i can see these images, it loads.
But when i try to copy and paste image into powerpoint, word or somewhere i getting nothing. Something tells me, the url is incompatible for this programs.
So is there another way to copy image to clipboard (like in firefox)?
Reply all
Reply to author
Forward
0 new messages