API to go from a note file to its preview HTML?

I’m working on a plugin that will be able to surface previews of my notes outside Obsidian itself. I have most of the key parts working, but am struggling to find a way to go from a single note file (a TFile, I think) to its equivalent preview html. Based on my reading of the API, it seems like the way to do this is to go through the active leaf and its associated views, but because my plugin is concerned with serving this up outside Obsidian’s UI, I need to be able to parse obsidian-flavored markdown without mounting any views. Is that possible? MarkdownPreviewRenderer seems promising, but has no public members yet.

2 Likes

Hello @kevboh, have you find a way to get rendered html without an active leaf ?
thank you