This can be done via recent versions of xclip which support the -t text/html (target selection) and pandoc to convert html to markdown.
See the details: Save HTML from clipboard as markdown text - Unix & Linux Stack Exchange
Thanks to @mountainx for asking again on the Unix stackexchange, which provided this solution, as noted in a comment above.