Hi,
I already had a look at these questions, without a clear answer for my issue:
https://answers.atlassian.com/questions/54365/confluence-4-x-why-can-built-in-macros-still-be-inserted-using-wiki-markup-but-apparently-not-my-custom-macro
https://answers.atlassian.com/questions/24391/replacement-for-renderconfluencemacro
I am developing a Confluence plugin for the latest version 4.3-RC1 (the question should apply to all 4.* Confluence versions). Rendering the Macro inside the Wysiwyg-Editor works fine. However, I can't find a way to embedd the macro inside of my .vm template. In previous Confluence versions, this was achieved by the #renderConfluenceMacro function. I can't get this function working with my xhtml-macro, I only get the error "unknown macro".
However, rendering a built-in Confluence macro like "loremipsum" with #renderConfluenceMacro("{loremipsum}") works fine.
So, how can I render a macro within a .vm template in Confluence 4.*? In atlassian-plugin.xml, my macro is defined as follows:
<xhtml-macro name="scevents" class="de.scandio.confluence.plugins.sc.events.macros.Event.TeaserListMacro" key="scevents">
<parameters>
<parameter name="limit" type="string" />
</parameters>
</xhtml-macro>I also tried the approach using the XhtmlContent Interface as specified in one of the above questions:
$xhtmlContent.convertWikiToView("{scevents}", null, null)The $xhtmlContent is a DefaultXhtmlContent instance. This call just gives me a NullPointerException using the two null-parameters.
I appreciate any help, since this is a fairly important plugin for us.
Regards,
Felix Grund [Scandio GmbH]