﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
12961	"[Chrome] Pasting copied images into chrome from paint or ""printscreen"" should be supported"	Jonathan	Piotr Jasiun	"Pasting images into CKEditor should support pasting copied images from MS Paint or from ""PrintScreen"" into Chrome as it does in IE11 and Firefox.

Comment #7 here seems to indicate that it is not possible for this to work for Blink browsers.  
[http://dev.ckeditor.com/ticket/11526#comment:7]

However, this particular functionality is supported by Chrome.  

I was able to verify this by using the following code in the paste event on a simple contenteditable div:
 

{{{
var items = (event.clipboardData || event.originalEvent.clipboardData).items;
var blob = items[0].getAsFile();
var reader = new FileReader();
reader.onload = Function.createDelegate(this, function (event)
{
    var image = document.createElement(""img"");
    image.src = event.target.result;
    this.Container.appendChild(image);
}); 
reader.readAsDataURL(blob);
}}}

The gotcha is that clipboardData.items is cleared in Chrome at the end of the execution of the browser’s paste event.   If you try to access the items collection outside of the paste event (after a setTimeout is called), the items collection has been cleared and is no longer accessible.   In my testing items[0].getAsFile() needs to be called before the paste handler execution completes."	Bug	closed	Normal	CKEditor 4.5.0 Beta	Core : Pasting		fixed		
