jaraco / jaraco.clipboard

MIT License
21 stars 1 forks source link

Cannot copy HTML on Darwin (macOS) #4

Closed optilude closed 5 years ago

optilude commented 5 years ago

Using copy_html() on macOS results in plain text being copied. The reason is that the delegation to the underlying richxerox API is not correct.

copy_html = functools.partial(richxerox.copy, format='html')

however the call signature of richxerox.copy() is:

def copy(text=None, clear_first=True, **kwargs):

You are meant to do copy(html=some_html). There is no format= kwarg.

jaraco commented 5 years ago

I see. Yes, I think I assumed the interface was symmetric with the paste interface, where format="html" is the signal.

jaraco commented 5 years ago

Thanks for the report. 2.0.1 is releasing now.