Cannot get macro to display inline
Asked by Wendy Fergusson:

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

Code such as this:

```
&lt;ac:macro ac:name="report-link"&gt;&lt;ac:parameter ac:name="atlassian-macro-output-type"&gt;INLINE&lt;/ac:parameter&gt;&lt;ac:default-parameter&gt;content:url&lt;/ac:default-parameter&gt;&lt;ac:rich-text-body&gt;&lt;ac:emoticon ac:name="green-star"/&gt;&lt;/ac:rich-text-body&gt;&lt;/ac:macro&gt; and some text here&lt;/p&gt;
```

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:rich-text-body><ac:emoticon ac:name="green-star"/></ac:rich-text-body></ac:structured-macro><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?
```


Answers:
author: Steven Parsons
body: 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


author: Matthew J. Horn
body: 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:

[https://answers.atlassian.com/questions/196207/are-macros-now-always-wrapped-in-tags](/questions/196207/are-macros-now-always-wrapped-in-tags)

<https://jira.atlassian.com/browse/CONF-10790>

[https://answers.atlassian.com/questions/139927/confluence-how-can-i-remove-empty-whitespace-paragraph-tags](/questions/139927/confluence-how-can-i-remove-empty-whitespace-paragraph-tags)

comments: author: Wendy Fergusson
body: 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.


author: Ryan Goodwin
body: 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:

<https://jira.atlassian.com/browse/CONF-31658>

This may also be releated:

<https://jira.atlassian.com/browse/CONF-24581>

comments: author: Wendy Fergusson
body: 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](https://jira.atlassian.com/browse/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)


author: Ryan Goodwin
body: 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:

<https://marketplace.atlassian.com/plugins/com.atlassian.confluence.plugins.editor.confluence-source-editor>


author: Wendy Fergusson
body: 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.