Cannot get macro to display inline

This appears to be a change in behaviour from Confluence 4.3.7 to 5.3.1.

Code such as this:

<ac:macro ac:name="report-link">
<ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
<ac:emoticon ac:name="green-star"/>
</ac:macro> and some text here</p>

Is automatically changed to this:

<ac:structured-macro ac:name="report-link">
<ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
<ac:parameter ac:name="">content:url</ac:parameter>
<ac:emoticon ac:name="green-star"/>
<p>and some text here</p>

I can't get it to put the linked icon and the text on the same line. I have encountered this in a couple of different scenarios, it's almost as if the INLINE setting is just ignored.

It works as expected in 4.3.7 - I can get the linked icon and the text on the same line.

Is this a known issue? Is there a workaround, or a fix in progress?

3 answers

I am experiencing the same bug as Wendy. The editor keeps adding back in the extra <p> tags every time i save out of the source editor.

Any ideas on how we can fix this? We use the inline macro for the Mathinline Macro

Hi Wendy,

It looks like you've identified a bug. I haven't been able to find a report of this specifically, so I created one here:

This may also be releated:

I don't think the issue you described in the bug is the same one as what I'm seeing. In my case the editor is adding unwanted <p> tags.

I don't think my problem is related to CONF-24581 because that is about the default setting of the output type parameter. In my case the parameter is set correctly but the setting is ignored.

I've confirmed that the problem happens with these macros (there could be others as well, these are the ones I've found):

  • excerpt
  • htmlcomment
  • report-link
  • tooltip (a user macro we've added)
  • latex (from a custom plugin we've written)

Hi Wendy,

I was informed that this is the intended rendering due to being a block level element. Perhaps you can use a page layout with 2 columns to get the items to render on the same line.

If you're getting extra <p> tags, you can try removing them using the confluence source editor add-on:

What exactly is a block level element? These macros are set with <code><ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter><code>.

Two columns will not do what I want - I want the macro embedded into a paragraph of text.

I cannot remove the extra <p> tags - the editor automatically adds them back in.

You can try piping the macro through another macro and removing the extra <p> tags with string functions like trim() or substring().

Here's some workarounds and examples:

Thanks for the suggestions, but I don't think they help in this case. The extra <p> tags are not around the macro output - they're being inserted around the text which comes after the macro closing tag.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Dec 18, 2018 in Confluence Cloud

Happy holidays from our team to yours!

Hi Community!  2018 was filled with changes for our team, both big and small, and we've taken a lot of time to both celebrate our wins and recognize areas of improvement. One thing that we're a...

475 views 3 18
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you