将HTML复制到UIPasteboard [英] copy HTML to UIPasteboard

查看:163
本文介绍了将HTML复制到UIPasteboard的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从我的应用程序传输HTML到iPhone邮件应用程序。
我已经有了HTML文本 - 可以说< span style ='color:red'> Test< / span>
我可以把它放到UIPasteBoard中 - 但是当我粘贴它到邮件时,

I want to transfer HTML from my app to the iPhone mail application. I already have the HTML text - lest say <span style='color:red'>Test</span> I can place this to UIPasteBoard - but when I paste it to mail I get the html source.

当我在HTMLView中放置相同的字符串时 - 选择它并将其复制粘贴为红色文本。

When I place the same string in a HTMLView - select it there and copy it it pastes as red text in mail.

为了将字符串粘贴到UIPasteBoard中,我需要做些什么才能将它作为红色文本粘贴到邮件应用程序中?
我一直在寻找格式类型 - 并且发现UIPasteBoard在剪贴板中具有元素(从UIWebView复制)时返回Aplle Web Archive pasteboard type。
但是,将内容添加到UIPasteBoard时,将其设置为类型不会在邮件应用程序中粘贴任何内容。

What do I have to do to place the string in the UIPasteBoard so that it pastes as red text to the mail application? I've been searching for "format types" - and found that UIPasteBoard returns "Aplle Web Archive pasteboard type" when I have the element (copied from UIWebView) in the clipboard. But setting this as type when adding the content to UIPasteBoard pastes nothing in the mail app.

Manfred

Manfred

推荐答案

不,它不能。 UIPasterBoard只接受字符串,图片,URL和颜色。

No, it cannot. UIPasterBoard only accepts strings, images, URLs and colors.

这篇关于将HTML复制到UIPasteboard的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆