First I would like to thank the developers of FoldingText for a really awesome application! Now on to my question.
I have verified that it works as expected within FoldingText, but my current set up is not very elegant. Right now my extension typesets any line with a @katex tag and leaves the original latex-string visible. This is of course not optimal.
What I would like to do is to mimic what FoldingText is doing for
**, that is to replace any string within some delimiter characters with the typeset formula and show the latex code, as well as allow editing whenever the cursor enters the delimited region. Is this possible to do within an extension/plugin? I tried to look through the source for examples of how to do this but failed.
Any pointers to extensions that solve my original typesetting problem, extensions that have examples of what I want to do or pointers to examples in the source would be greatly appreciated!