如何从剪贴板读取复制的 html 文本及其 html 标签?
当用户从网页中选择并复制文本时,我需要获取包含所有 html 标签的文本,以便我可以选择一些特定的属性等。
是否可以从 .NET 应用程序读取它?
谢谢
When a user selects and copies a text from a web page, I need to get that text with all the html tags included so that I can select some specific attributes etc.
Is it possible to read it from .NET application?
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Clipboard.GetText
方法将检索剪贴板中的 HTML 内容:您可以使用
Clipboard.ContainsText
方法。The
Clipboard.GetText
method will retrieve HTML content from the clipboard:You can check if the clipboard contains HTML with the
Clipboard.ContainsText
method.