At the moment, macros and other plugins that generate content are aware of their render mode but don't have the facilities to correctly render themselves for the destination format. The following things are often broken in the export of macros:
- links, especially to Confluence content
- styles and complex markup
To fix this, macro plugins need access to a link/image URL generator for Confluence content.*
A better API that indicates which render modes are required would also help. The current method of relying on the author to check a field in the RenderContext means that the export render modes are often forgotten.
This issue incorporates specific instances of this problem.
- There is actually a linkRenderer in the renderContext already. But to use it means creating a Link object, which itself requires a GenericLinkParser, a Manager and the object to be linked to. Not the easiest interface to work with.