How to create a confluence macro with body that produces an inline output? The following macro:
## @noparams
<font color="red">$body</font>
applied to this text
Before macro [macro starts here]macro body[macro ends here] after macro.
Will create this HTML code:
<p>Before macro </p>
<font color="red">macro body</font>
<p>after macro.</p>
How to remove the <p></p> tags?
This is an issue with Confluence. To avoid this, you have to use html output. If the body or your macro contain wiki markup, then you will have to render this by hand. My workaround is as follows:
EDIT: You will want to modify the regex if there are p tags in your macro that you want to keep. The regex in the code above will remove ALL p tags.