Programmatically display a Markdown file


Is there an obvious way to display a Markdown file in a pane? To be clear: I would like to display only the rendered content, not the Markdown source file. I could ape what the markdown-preview package does, but it would be wonderful if there was an easy way to do this.


I think monkey the markdown preview package is the obvious way to the extend the package don’t do much beside getting content of a buffer, passing to a 3rd party mardown (marked i think) and displaying content on a tab. Maybe add a few keyboard shortcut and scroll event on the way.

If you think there’s a need to display arbitrary markdown content in a pane you can give a try and submit a PR to extend the preview with a markdown display service. Keep in mind that core developers are usually prudent before accepting features that increase their support burden.


Thank you. I was trying to minimize dependencies though. I guess the only way to do so is to display HTML, which I assume can be done without relying on other packages or libraries (I still need to investigate this).