zlacker

Show HN: CLI tool to convert Markdown to rich HTML clipboard content

submitted by letien+(OP) on 2026-02-05 07:05:31 | 9 points 6 comments
[view article] [source] [links] [go to bottom]

At work I need to use Teams. It supports a few Markdown features, but the editing experience for long message isn't smooth. So, I often write in nvim, preview it in the browser and then copy paste to Teams. This tool help me get rid of the review and copy step.

Build with Rust + Claude Code. Tested on Windows and Mac, should works on Ubuntu as well.

Caveats: it's still up to the pasted app to handle the HTML clipboard content.

replies(2): >>dhruv3+U >>roxolo+aG
1. dhruv3+U[view] [source] 2026-02-05 07:13:45
>>letien+(OP)
Interesting - I think this can go with Voiden.

We are a offline API client using Markdown.

Take a look here maybe : https://github.com/VoidenHQ/voiden/

2. roxolo+aG[view] [source] 2026-02-05 13:08:27
>>letien+(OP)
I’d highly recommend pandoc[0] if you need markdown conversion. Basically converts from everything and any markdown style to everything else. And then for clipboard just use `| pbcopy` on a Mac or `| xsel -ib`. Full command on a Mac would just be `pandoc README.md -t html | pbcopy`. If you want a docx you can get that too.

0: https://pandoc.org/

replies(2): >>letien+OJ >>cspete+Qq1
◧◩
3. letien+OJ[view] [source] [discussion] 2026-02-05 13:33:06
>>roxolo+aG
I need the rendered content, not the plain text HTML. As mentioned in the README, I used pandoc in a previous version of the tool, but its output isn’t good looking for my use case.
replies(1): >>naikro+0Z
◧◩◪
4. naikro+0Z[view] [source] [discussion] 2026-02-05 15:04:09
>>letien+OJ
> I need the rendered content

what do you mean, here? you rasterize the markdown into an image?

[edit] yes he rasterizes the markdown into an image

replies(1): >>letien+331
◧◩◪◨
5. letien+331[view] [source] [discussion] 2026-02-05 15:22:19
>>naikro+0Z
Please read the README. The tool turns Markdown into NSPasteboard on Mac, or CF_HTML on Windows, so that when you press Cmd/Ctrl-P onto supported applications (Teams, Word, Google Docs), you get something similar to how Github would display the Markdown in the browser.
◧◩
6. cspete+Qq1[view] [source] [discussion] 2026-02-05 17:32:06
>>roxolo+aG
Bonus, xclip can be directed provide the rich text directly to the clipboard (op this might offer you a solution that is usable as text by your recipients):

`cat something.md | pandoc -f gfm -t html | xclip -selection clipboard -t text/html`

other output type targets also available, check xclip docs

my small experience with Wayland suggested this sort of thing might be more difficult there, but dunno

[go to top]