I’m trying to build a LilyPond plugin. Since LilyPond compiles and is generated server side, each time my registerMarkdownCodeBlockProcessor is called, I execute lilypond for the codeblock and use an image tag to display the generated output.
However, given this takes a few seconds, when you swap between notes that use this codeblock, there’s a few second delay before it shows.
But, I don’t have to have this delay if I can tell that the lilypond codeblock contents haven’t changed, and just show the last generated image output instead (i.e. if I swap between editing and view modes, or toggle between notes).
Is there a flag that gets passed in that indicates the user actually edited the codeblock contents instead of it just being render for some other reason?