According to the man
page for pbpaste
,
-Prefer {txt | rtf | ps}
tells pbpaste what type of data to look for in the
It is very easy via AppleScript (tested in 10.11 El Capitan):
set the clipboard to (the clipboard as «class RTF »)
You can create a Service via Automator:
The Script:
-- name: convert to RTF
on run {input, parameters}
set the clipboard to (the clipboard as «class RTF »)
return the clipboard
end run
Done. Now save the new Service and to try it out: Select a text, then go to the Application Menu and choose "Services" > "convert to RTF"