Hello Folks,
I have the following custom user macro:
Macro Body Processing = No Macro Body
## @param Name:title=Name|type=string|required=false|desc=Title of term to display
#if($param0) #set($termName=$param0) #end
#if($paramName) #set($termName=$paramName) #end
#if($termName)
<ac:macro ac:name="report-block">
<ac:parameter ac:name="injected">true</ac:parameter>
<ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
<ac:rich-text-body>
<ac:macro ac:name="content-reporter">
<ac:parameter ac:name="scope">SITE:Terms > children</ac:parameter>
<ac:parameter ac:name="matchAll">true</ac:parameter>
<ac:parameter ac:name="type">page</ac:parameter>
<ac:parameter ac:name="space">+SITE</ac:parameter>
<ac:parameter ac:name="key">content:children</ac:parameter>
<ac:rich-text-body>
<ac:macro ac:name="text-filter">
<ac:parameter ac:name="include">$termName</ac:parameter>
<ac:default-parameter>content:title</ac:default-parameter>
</ac:macro>
</ac:rich-text-body>
</ac:macro>
<ac:macro ac:name="report-body">
<ac:rich-text-body>
<ac:structured-macro ac:name="html" ac:schema-version="1">
<ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
<ac:plain-text-body><![CDATA[<span style="border: 3px outset blue;" onmouseover="this.style.border='3px inset blue';" onmouseout="this.style.border='3px outset blue';"><a title="%data:definition%">%content:title%</a></span> ]]></ac:plain-text-body>
</ac:structured-macro>
</ac:rich-text-body>
</ac:macro>
<ac:macro ac:name="report-empty">
<ac:rich-text-body>$termName</ac:rich-text-body>
</ac:macro>
</ac:rich-text-body>
</ac:macro>
#else
<span style="color: red;">Search term required, see this page for more info:
<ac:link>
<ri:page ri:content-title="Terms" ri:space-key="TOOL"/>
<ac:plain-text-link-body><![CDATA[Terms]]></ac:plain-text-link-body>
</ac:link>
</span>
#end
For some reason, when the text is rendered on the page, it has <p> tags surrounding it. So, it shows up on its own line instead of inline as I've specified.
I downloaded and installed the Confluence Source Editor add-on. I opened the source editor on the affected page, and tried to remove the <p> tags manually, but they are not there. Here is a portion of the source code:
<p>SPAN is brought to you by the Agency Principles and Processes for Software (APPS) project team.</p>
<p>SPAN is a compendium of Processes, Procedures, Job Aids, Examples and other recommended best practices. Working hand in hand with the <ac:structured-macro ac:macro-id="cecdbfe5-c0a8-4445-9215-b3782b459aac" ac:name="term" ac:schema-version="1">
<ac:parameter ac:name="Name">SWEHB</ac:parameter>
</ac:structured-macro> Software Engineering Handbook <sup>
<ac:link ac:anchor="References">
<ac:plain-text-link-body><![CDATA[002]]></ac:plain-text-link-body>
</ac:link>
</sup> and the collection of Engineering Principles, these assets are intended to facilitate the software development process Agency wide.</p>
Is there any way to remove these <p> tags? Is my code wrong? It worked in Confluence 5.8.18 just fine. Any suggestions are greatly apprectiated. Thanks!
Chris Martino