How can i update the complete readingPreview if the markdownview is changed

I registered something to to in registerMarkdownPostProcessor and it works. But my problem is that a change in the markdown may lead to a change in the reading preview on other elements. So i need to update the whole reading preview (complete processing of the markdown to the reading preview), but i don’t find a refresh or update function for the reading view. Have i missed something ?

I’m searching in forum and search for examples but don’t find anything about refresh of complete reading preview…

Could somebody help me with a little hint ?

this.registerMarkdownPostProcessor((element, context) => {
      element.querySelectorAll("p").forEach((el) => {
            context.addChild(new RenderedElement({ containerEl: el }));

Instead of rendering the whole markdownview i’m able to find out which markdowneditorlines has to rendered new. How is the best way obsidian to say, please render a special line of the markdownview and update the previewView ? Could i define a new state without changing the line and through a new state the rendering and markdowmpostprocessor will automatically updated the preview ?

1 Like