当我从 Safari 中的网站复制文本时,会创建两个粘贴板项目。这是[粘贴板项目]的输出
(
{
"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>;
}
)
Run Code Online (Sandbox Code Playgroud)
什么是“iOS 丰富内容粘贴粘贴板类型”?数据实际上代表什么?其他应用程序是否使用过这种表示?
谢谢。
自从提出这个问题以来已经很长时间了,但无论如何看起来我已经在WebKit bug 的补丁中找到了答案。
下面是补丁中的代码片段,演示了这种粘贴板格式只是 UIKit 的一个标志。不过,不确定“两步粘贴”到底是什么。
// 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];
Run Code Online (Sandbox Code Playgroud)