How to open the markdown file using a custom command?

I didn’t have the opportunity to test it, but according to this post you can copy html from the preview mode in Obsidian.