Getting access to rich-text data from the clipboard (on Mac)

· Jamie Tanna · Jan. 13, 2026, 1:42 p.m.
Summary
This blog post discusses how to retrieve rich-text data from the clipboard on a Mac using Swift, detailing the limitations of the standard pbpaste command and presenting a solution via a custom Swift script that successfully extracts HTML content from the clipboard.
AUTHOR
Sponsored
Zulip logo Zulip
Organized team chat for people who take work seriously. Topic-based threading keeps conversations focused.
Try Zulip
Become a sponsor →