Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-94666

User macro created in Confluence is not rendered inline

XMLWordPrintable

      Issue Summary

      A user macro is now rendered as an output-block rather that output-inline leading to macros not being rendered correctly inline as they were previously. This worked as expected prior to 8.4.2

      This is reproducible on Data Center: Yes

      Steps to Reproduce

      1. Create a user macro with the following contents:
        ## @param Tip:title=Tool Tip|type=string|required=true|desc=What will be displayed when the cursor hovers over this area?
        #set( $id = $action.dateFormatter.calendar.timeInMillis )
        #requireResource("com.atlassian.auiplugin:aui-tooltip")
        <span id="content$id" title="$paramTip" style="border-bottom: 1px dashed; cursor: help; display: inline;"><a style="display: inline;">$body</a></span>
        <script type="text/javascript">
        AJS.toInit(function(){
            AJS.$("#" + "content$id").tooltip({gravity: 's'});
        });
        </script>
        
      1. Use the macro in a page to add a tooltip to a word.

      Expected Results

      The word with the tooltip is displayed inline:

      The macro is contained within a span tag with a class of conf-macro output-inline

      <div id="main-content" class="wiki-content">
        <p>This is a&nbsp; <span class="conf-macro output-inline" data-hasbody="true" data-macro-name="tooltip">
            <span id="content$id" title="tooltip" style="border-bottom: 1px dashed; cursor: help; display: inline;">
              <a rel="nofollow" style="display: inline;">tooltip</a>
            </span>
            <script type="text/javascript">
              //
              < ![CDATA[AJS.toInit(function() {
                    AJS.$("#" + "content$id").tooltip({
                      gravity: 's'
                    });
                  });
                  //]]>
            </script>
          </span>
        </p>
      </div>
      

      Actual Results

      The word is displayed on the next line:

      The macro is now in a div with a class of conf-macro output-block

      <div id="main-content" class="wiki-content">
        <p>This is a&nbsp;</p>
        <div class="conf-macro output-block" data-hasbody="true" data-macro-name="tooltip">
          <span id="content$id" title="tooltip" style="border-bottom: 1px dashed; cursor: help; display: inline;">
            <a rel="nofollow" style="display: inline;">tooltip</a>
          </span>
          <script type="text/javascript">
            //
            < ![CDATA[AJS.toInit(function() {
                  AJS.$("#" + "content$id").tooltip({
                    gravity: 's'
                  });
                });
                //]]>
          </script>
        </div>
      </div>
      

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

        1. image-2024-02-21-14-30-46-908.png
          18 kB
          Dean Norman
        2. image-2024-02-21-14-31-20-356.png
          17 kB
          Dean Norman

              Unassigned Unassigned
              7829eff5df87 Dean Norman (Inactive)
              Votes:
              5 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated: