Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the "iOS rich content paste pasteboard type" when copying from Safari?

When I copy text from a website in Safari, two pasteboard items are created. This is the output of [pasteboard items]

(
        {
        "Apple Web Archive pasteboard type" = < [...archive...] >;
        "public.text" = "pages of a journal,";
    },
        {
        "iOS rich content paste pasteboard type" = <694f5320 72696368 20636f6e 74656e74 20706173 74652070 61737465 626f6172 64207479 7065>;
    }
)

What is the "iOS rich content paste pasteboard type" all about? What does the data actually represent? Is this representation ever used by other apps?

Thanks.

like image 458
zolibra Avatar asked Nov 12 '22 02:11

zolibra


1 Answers

It's been long time since this question was asked, but anyways looks like I've found the answer in a patch for a WebKit bug.

Here's a code snippet from the patch demonstrating that this pasteboard format is just a flag for UIKit. Not sure what a "two-step paste" is all about, though.

// Flag for UIKit to know that this copy contains rich content. This will trigger a two-step paste.
static NSString* webIOSPastePboardType = @"iOS rich content paste pasteboard type";
[representations setValue:webIOSPastePboardType forKey:webIOSPastePboardType]; 
like image 124
DmytroL Avatar answered Nov 15 '22 05:11

DmytroL