`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