I’m working on a plugin for Obsidian (https://obsidian.md), which uses CodeMirror (5 & 6) to edit and display markdown documents. Part of the plugin API for Obsidian is a function “registerMarkdownPostProcessor()”, which allows adding a callback to parse and render custom markdown in the document. The callback is called for each section that is added to or modified in the markdown document.
So, I need to be able to trigger ALL sections of a markdown document to be re-processed and rendered by the callbacks that are registered through “registerMarkdownPostProcessor()”. I discussed this in the Obsidian discord server and, by the end of that conversation, I was left with the impression that this markdown processing is likely handled by CodeMirror, or a CodeMirror support library.
Is it true, that CodeMirror, or a support library of CodeMirror, handles markdown processing? If so, is there a way to force it to re-process all markdown in a document at once? The usual practice of processing each section as the user types them is fine, but there are cases where I need to re-evaluate the entire document after external information has changed
Thanks for any help you can provide.