Thread:Project:Support desk/Process mediawiki text of a page via Lua before showing it

Hello guys,

I write the German Wikibook Mathe für Nicht-Freaks. For this I use Lua to generate the navigation header and the footer dynamically. Now I want also to have the ability to process the mediawiki text via Lua before it goes to the Parser. To archive this I can write something like this:

In the function  of the module   I now can process the content before I return it. Unfortunately the section editing does not work anymore with this solution. Because the whole content is encapsulated in a module invocation, also editing the page with the VisualEditor does not work very well.

Is there anything I can do to process the mediawiki text beforehand without having the problems mentioned above?