I am wanting to learn to create a plugin that would take a code fence in a note that contains YAML structures. Then when exiting the code fence, have the plugin take the YAML, render an HTML template, something like handlebars, and replace the code fence with HTML.
However, I’m not sure where to start. I know there is two modes: Edit and Reader mode which contains different CSS classes and such. So, knowing that, I’d need to figure what the rendered form in Edit and Reader modes are.
An example of what I’m thinking of is Fantasy Stat Blocks by Javalent. However, I think it’s a bit much for what I need.
I also intend to at some point replace the code block with the rendered output just like template so it executes once and renders output to the file and saves. Is that more what you were thinking about?
Yes. The output of the queries can be passed to obsidian to process as markdown and render or it can be bypassed and the raw html can be returned to render exactly as is.
I also have handlebars helpers to take markdown and return html so you can do partial processing.