Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding set_target for xclip #126

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

britiger
Copy link

Adding the method set_target for setting a "content type" of the clipboard data. So it is possible to paste HTML if you copy a web page:

import pyperclip
pyperclip.set_target('text/html')
text = pyperclip.paste()  # text will have the content of clipboard
print(text)

May it would be usefull to implement this for other clipboards

@clach04
Copy link

clach04 commented Aug 14, 2021

I just stumbled across this and #162 which does the same for Windows.

I went ahead and merged that with this into https://github.com/clach04/pyperclip/tree/html_linux_win32 although its untested, right now I've mostly needed Windows support (and I added html support into https://github.com/clach04/xerox/tree/my-main)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants