Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-73848

Static macro returning a code block displays with wrong CSS

    XMLWordPrintable

Details

    Description

      Issue Summary

      When a static content macro returns a code macro storage format, the display is incorrect due to CSS clash.

      This happens with the Connect macro returns the same Storage Format that the code block returns.

      Steps to Reproduce

      1. Create a Connect static macro that returns a code block, e.g.
        atlassian-connect.json
          "modules": {
            "staticContentMacros": [
              {
                "key": "helloworld-macro-static",
                "name": {
                  "value": "Hello World Macro Static"
                },
                "url": "/macro-static",
                "description": {
                  "value": "Says 'Hello World'."
                },
                "outputType": "block",
                "bodyType": "none"
              }
            ]
          }
        
        Java Controller
        @GetMapping(value = "/macro-static", produces = MediaType.TEXT_PLAIN_VALUE)
        public String getStaticMacro() {
            return "<ac:structured-macro ac:name=\"code\" ac:schema-version=\"1\" ac:macro-id=\"dd05c377-6385-4c02-8790-0fb3dfdf7209\"><ac:plain-text-body><![CDATA[hello, world]]></ac:plain-text-body></ac:structured-macro>";
        }
      2. Add macro to a page

      Expected Results

      The macro should appear as a normal code macro

      Actual Results

      The macro appears with incorrect CSS

      Workaround

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

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jrichards@atlassian.com James Richards
              Votes:
              5 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: