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

Macro body type behaviour is not rendered correctly in Preview Mode and in the new Fabric Editor

XMLWordPrintable

      Issue Summary

      Dynamic content macros exhibit inconsistent behaviours w.r.t. the persistence and retrieval of macro bodies.

      Steps to Reproduce

      1. Create an app containing three dynamic content macros - one each corresponding to different values macroBody: none, plain-text and rich-text.
      2. For the dynamic content macros, implement a custom editor that saves macro body data.
      3. Insert the macros into the legacy and fabric editors.
      4. Observe the way the editor displays the macro in preview mode.

      Expected Results

      The legacy and fabric editors exhibit consistent behaviour, albeit the fabric editor trying to provide an experience that is closer to WYSIWYG.

      Actual Results

      Various unexpected differences in behaviour occur relating to the persistence and retrieval of macro bodies using the JavaScript API and the display of the macro in preview mode:

      bodyType  Legacy Editor Fabric Editor
      none No body visible in preview mode. The macro is displayed in preview mode (output.type = preview). Macro body data saved using AP.confluence.saveMacro(macroParams, macroBody) is ignored. AP.confluence.getMacroBody always returns an empty string.
      plain-text Preview mode displays the macro body data in plain text form. Tags such as <p> are visible. The macro is displayed in preview mode (output.type = preview). Macro body data can be saved and retrieved using the javaScript API.
      rich-text Preview mode displays the macro body data in rich text form. Tags such as <p> are not visible.  The macro is not displayed in preview mode. It displays a container, however, the container is always empty. Macro body data saved using AP.confluence.saveMacro(macroParams, macroBody) is converted to "<p />".

      Workaround

      None

              obeztsinnyi@atlassian.com Oleksandr Beztsinnyi
              dmorrow@atlassian.com Dugald Morrow
              Votes:
              25 Vote for this issue
              Watchers:
              14 Start watching this issue

                Created:
                Updated:
                Resolved: