title: An HTML snippet with an img tag copied to pasteboard by my app does not paste properly in Apple Mail
body: <p>I am working on an app that puts a piece of generated HTML to UIPasteboard so that the user can then paste the generated HTML snippet to their email client.</p>
  
  <p>I've gotten to the point where HTML content <em>without images</em> is properly recognized and pasted in at least Apple Mail, GMail and Yahoo Mail.</p>
  
  <p>Now, when I add an <code>img</code> tag to the generated HTML snippet, the image can be pasted just fine to both GMail and Yahoo Mail, but Apple Mail ignores the image (still it allows the rest of the generated HTML snippet to be pasted intact).</p>
  
  <p>I've tried putting the same HTML snippet to a WkWebView, copied the entire web view contents and pasted to Apple Mail. Surprisingly, the image in question got pasted to the email body, but the resulting look of the whole snippet was - should I say - simplified (e.g. colors and font styles were lost)</p>
  
  <p>So I went to analyzing the item types WebKit puts on the pasteboard, and noticed a magic item type named <code>iOS rich content paste pasteboard type</code>. This one is not documented, and the only reference to this item type I could find in the WebKit source code mentioned something called "two-step paste" (whatever that could mean).</p>
  
  <p>I modified my app code to put this "magic" item type to the pasteboard hoping that it would solve the image pasting problem. Alas - while the magic worked in terms of making my HTML snippet now look stripped of colors and font styles when pasted to Apple Mail, it did not help in pasting the image successfully. </p>
  
  <p>I should also mention that I put the HTML content as both <code>public.html</code> and <code>Apple Web Archive pasteboard type</code> - however, I am <strong>not</strong> adding the WebResourceResponse key to the image subresource in the latter. </p>
  
  <p>So, the questions:</p>
  
  <ol>
  <li>What is the proper way of pasting an HTML snippet with an image to UIPasteboard so it could be correctly recognized and pasted into another app (of course, assuming the app is capable of handling HTML content from the pasteboard)</li>
  <li>What is this "two-step paste" mode and why is it special for Apple Mail? </li>
  <li>Could it be that Apple Mail is specifically sensitive to the WebResouceResponse key in the web archive (because both GMail and Yahoo! Mail both happily paste the image without this key being present in the web archive)?</li>
  </ol>