I try to initialize the com.atlassian.confluence.content.render.xhtml.Renderer but had no luck so far to figure out how...
Could anybody give me some tips or point me to the right direction?
Community moderators have prevented the ability to post new answers.
Hi Florian!
You can inject the component named "viewRenderer", it's an instance of this Renderer interface.
Regards
Hi Mirko
I tried to inject it via
public void setviewRenderer(Renderer viewRenderer) { this.viewRenderer = viewRenderer; }
as written here: https://developer.atlassian.com/display/CONFDEV/Accessing+Confluence+Components+from+Plugin+Modules
but its still null when I try to use it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you please try it with "setViewRenderer" (camel case) or simply "setRenderer"? The component is available, we only have to find the correct naming for dependency injection. ;) You can check for plugin available components in the following list:
<confluence-url>/admin/pluginexports.action
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the pluginexports link!
I noticed it says something about V2 so I changed my code to:
private final Renderer viewRenderer; public MyClass( Renderer viewRenderer ){ this.viewRenderer = viewRenderer; }
and it worked!
Thanks! :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.