If you have an macro with the output type set to OutputType.INLINE and you specify a body type (BodyType.RICH_TEXT or BodyType.PLAIN_TEXT) then the editor will set your macro to render in BLOCK mode.

      • An inline macro is rendered in block mode in the editor to allow for a place to edit the body. If it was rendered inline, there would be no way to set the body.
      • The macro was defaulted to block so the editing experience was more "WYSIWIG". It was thought at the time that the inline macro that looked like a block macro was more confusing for a user.


      Shows that the test inline macro has been defaulted to BLOCK. It was expected that this macro should default to INLINE.

      Further, if the inline macro has been manually set to INLINE the view format of this macro still appears to be block. Storage Format:

      <p>before</p><ac:structured-macro ac:name="test-inline-macro"><ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter><ac:rich-text-body>
      <p>test</p></ac:rich-text-body></ac:structured-macro>
      <p>after</p>
      

      Note that the atlassian-macro-output-type has been set to INLINE (by selecting it from the popup menu). This is rendered on three separate lines because the because the surrounding <p> tags are broken around the body.

            [CONFSERVER-24581] Inline macros with body default to block mode

            James added a comment -

            Seems to still be a problem in 7.5.1

            James added a comment - Seems to still be a problem in 7.5.1

            As this bug seemingly has been fixed with either 5.5.1 or 5.5.6, but has seemingly reappeared in 5.9.1, it looks to me like a regression and maybe reporting an new issue is better (see e.g. https://marketplace.atlassian.com/plugins/de.edrup.confluence.plugins.simple-cite/server/versionhistory - that plugin reports that it did not work before 5.5.6 due to this bug, and then had to add a bugfix release for 5.9.1 to work around a similar issue)

            Clemens Robbenhaar added a comment - As this bug seemingly has been fixed with either 5.5.1 or 5.5.6, but has seemingly reappeared in 5.9.1, it looks to me like a regression and maybe reporting an new issue is better (see e.g. https://marketplace.atlassian.com/plugins/de.edrup.confluence.plugins.simple-cite/server/versionhistory - that plugin reports that it did not work before 5.5.6 due to this bug, and then had to add a bugfix release for 5.9.1 to work around a similar issue)

            5.9.9 Still has this bug. Should this issue be reopened or a new one raised?

            Sam Hasler added a comment - 5.9.9 Still has this bug. Should this issue be reopened or a new one raised?

            Clemens Robbenhaar added a comment - - edited

            I agree with robert13 : even when a macro, which allows inline rendering, e.g. via:

              	public OutputType getOutputType() {
            	     return OutputType.INLINE;
            	}
            

            and is set as "inline" by the user in the editor, still the WYSIWYG-Editor adds line breaks before and after the macro.
            These line breaks cannot be removed in the editor.
            As a result the "inline" macro can only be rendered on a line by itself.
            This has nothing to do with CONF-22898 - as soon as the macro has a body, plain text or rich text, it is rendered on a line by itself. If the Macro does not have a body, it is kept inline in the editor (i.e. the "cheese" macro works just fine).

            Maybe it is better to open a new issue about this remaining problem?

            Clemens Robbenhaar added a comment - - edited I agree with robert13 : even when a macro, which allows inline rendering, e.g. via: public OutputType getOutputType() { return OutputType.INLINE; } and is set as "inline" by the user in the editor, still the WYSIWYG-Editor adds line breaks before and after the macro. These line breaks cannot be removed in the editor. As a result the "inline" macro can only be rendered on a line by itself. This has nothing to do with CONF-22898 - as soon as the macro has a body, plain text or rich text, it is rendered on a line by itself. If the Macro does not have a body, it is kept inline in the editor (i.e. the "cheese" macro works just fine). Maybe it is better to open a new issue about this remaining problem?

            Hi c.roser

            Thanks for getting in touch. We managed to resolve the issue where inline macro's with a body default to block mode and we raised https://jira.atlassian.com/browse/CONF-22898 to track the remaining work and this issue is fixed in 5.5.6 .

            Regards,
            Vu

            Vu Truong Vo (Inactive) added a comment - Hi c.roser Thanks for getting in touch. We managed to resolve the issue where inline macro's with a body default to block mode and we raised https://jira.atlassian.com/browse/CONF-22898 to track the remaining work and this issue is fixed in 5.5.6 . Regards, Vu

            C Roser added a comment -

            It's also not fixed in V 5.5.4. Please reset the ticket to unresolved and advise when this will be fixed.

            C Roser added a comment - It's also not fixed in V 5.5.4. Please reset the ticket to unresolved and advise when this will be fixed.

            The bug here is that the editor is inserting p tags around the macro when the Inline option is specified, so the output is not inline. The fix is to stop inserting p tags when the inline option is selected.

            I believe this was not fixed in 5.5.1 and should be reopened.

            CONF-22898 is about rich text. This happens even with plain text.

            Robert Lauriston added a comment - The bug here is that the editor is inserting p tags around the macro when the Inline option is specified, so the output is not inline. The fix is to stop inserting p tags when the inline option is selected. I believe this was not fixed in 5.5.1 and should be reopened. CONF-22898 is about rich text. This happens even with plain text.

            Hi daniel.n.zhang

            Thanks for getting in touch. We managed to resolve the issue where inline macro's with a body default to block mode and we raised https://jira.atlassian.com/browse/CONF-22898 to track the remaining work and this should be available in our next major release.

            Regards
            Steve HAffenden
            Confluence Bugmaster
            Atlassian

            Steve Haffenden (Inactive) added a comment - Hi daniel.n.zhang Thanks for getting in touch. We managed to resolve the issue where inline macro's with a body default to block mode and we raised https://jira.atlassian.com/browse/CONF-22898 to track the remaining work and this should be available in our next major release. Regards Steve HAffenden Confluence Bugmaster Atlassian

            Dan Zhang added a comment -

            It says fixed in version 5.5.1. I'm using 5.5.2 and still having the issue. Can anyone please address this? Thanks.

            Dan Zhang added a comment - It says fixed in version 5.5.1. I'm using 5.5.2 and still having the issue. Can anyone please address this? Thanks.

            Dan Zhang added a comment -

            I'd like to know if this has been fixed and in which version. Thanks.

            Dan Zhang added a comment - I'd like to know if this has been fixed and in which version. Thanks.

              vvo Vu Truong Vo (Inactive)
              b69cd711ec60 David Peterson
              Affected customers:
              36 This affects my team
              Watchers:
              37 Start watching this issue

                Created:
                Updated:
                Resolved: