title: Force paste event to encode images in base64
body: <p><strong>Background:</strong></p>
  
  <p>I'm developing an HTML5 webapp for my company which is basically a Rich Text Editor (similar to Google Docs) that stores information in a database.</p>
  
  <p>We are using CKEditor 3 as richtext editor and Jquery to acomplish this.</p>
  
  <p>We've chosen Google's Chrome as the preferred browser.</p>
  
  <p>Our app is currently in alpha testing period, having a group of 18 tester (which are the same ones that will use the app). These people is heterogeneous, but almost all of them  of them have basic computer skills, mostly limited to MS Word and MS Excel.</p>
  
  <p>.</p>
  
  <p><strong>Problem:</strong></p>
  
  <p>Most of our users still use word to elaborate the document, mainly due to its capacity of generating rich flowcharts. When they copy/paste the generated content to Chrome, images are pasted as link to a local file (auto generated by the OS, in a users/<em>*</em>/temp folder). This means the server can't access these files and the resulting documents (generated PDFs) don't contain the images.</p>
  
  <p>.</p>
  
  <p><strong>Question</strong></p>
  
  <p>How can I force pasted images to be encoded in base64, similiar to what happens in Firefox?</p>
  
  <p>.</p>
  
  <p><strong>Notes</strong></p>
  
  <p>If it's possible to "upload" to server an image referenced as src="file://c:\something", that would solve my problem as I can base64 encode that image later.</p>
  
  <p>We can't switch to firefox since it doesn't fully solve our problem (if an image is "pasted" alongside with text, firefox doesn't base64 encode it) and raises other issues such as an horizontal scrollbar appearing when the text is too long to fit in the textarea.</p>