A simple command line tool that converts markdown to rich text and copies it to the clipboard. Perfect for converting markdown tables to rich text that can be pasted into applications that support formatted text.
This is MAC OS only!
- macOS (uses native Cocoa framework for clipboard operations)
- Go 1.17 or later
- pandoc (
brew install pandoc
)
go install github.com/oderwat/md2cb@latest
Or download the latest release from the releases page.
The program reads markdown from stdin and places the converted rich text on the clipboard:
echo "| Header | Content |
|-|-|
| Cell 1 | Cell 2 |" | md2cb
Or read from a file:
cat your_table.md | md2cb
- Uses pandoc to convert markdown to HTML
- Converts the HTML to rich text using macOS's native NSAttributedString
- Places the result on the clipboard in both HTML and rich text formats
- Ready to paste into any application that supports formatted text
MIT License - see LICENSE.txt file