0

I can get the contents of the clipboard in the format of HTML on linux by using xclip

xclip -selection clipboard -o -t text/html

How can I do the same thing on Mac OS X? I heard that I could use pbpaste, but none of the following command worked for me.

pbpaste
pbpaste -Prefer rtf

Sometimes it just output plain text, and sometimes it output nothing.

Is there any way to do it?

Searene
  • 25,920
  • 39
  • 129
  • 186
  • See [this](http://hea-www.harvard.edu/~fine/OSX/cliphtml.html) (which is based on [this stackoverflow question](http://stackoverflow.com/questions/40054952/how-to-get-contents-of-the-clipboard-in-the-format-of-html-on-mac-os-x)). – Gordon Davisson Oct 15 '16 at 05:08
  • 1
    Possible duplicate of [How to get HTML data out of of the OS X pasteboard / clipboard?](http://stackoverflow.com/questions/17217450/how-to-get-html-data-out-of-of-the-os-x-pasteboard-clipboard) – mfazekas Mar 16 '17 at 14:56

0 Answers0