Closed mrdrogdrog closed 2 years ago
After the rendering we could place a MutationObserver on the headline to get notified when KaTeX changes the DOM again.
This seems to be an extension of https://github.com/hedgedoc/hedgedoc/issues/2899
No, actually these are too different problems. This is that react and Katex are running async. The other one is that toc done right filters elements.
Description If you edit the first headline, that contains latex code, then the rendered latex symbols won't show up in the document title. If you edit another line then the title is rendered correctly.
To Reproduce
# $\alpha$ alpha
Expected behavior The document title should be correct if editing the headline.
Additional context It seems like the KaTeX rendering is async. The extraction logic is triggered directly after the rendering of the note. So if you edit the headline then the extraction logic might be triggered before the async katex actions has finished. If you edit another line then the headline wasn't modified and the symbol is still present and can be extracted.