I was pleased to learn of render modes, which give a route to effectively choose what to display when exporting.
However, it seems that even basic Javascript is not run while exporting, even though this can be ‘static’ (adding “Hello world” to the top of the macro, for example.) Our macro needs to check our database, and update a handful of text areas. Is there a way to do this?
I’m not aware of a solution. The export is executed on the server which is not a browser to handle your JS. I ended up in storing a potential export result earlier during view and include it during export.
Thanks a lot for your reply. We were able to solve our export problem through rewriting some of our macro to use Handlebars where Javascript was used before. Since this is processed server-side, it worked great.