AP.confluence.getMacroBody on page edit returns an empty body in the new Confluence editor

XMLWordPrintable

    • Severity 3 - Minor

      Issue Summary

      When defining a dynamicContentMacro and invoking

      AP.confluence.getMacroBody(function(data){
          alert(`AP.confluence.getMacroBody - ${JSON.stringify(data)}`);
      });
      

      in page edit mode of the new Confluence editor, no body is returned in the callback function unlike the old editor.

      Steps to Reproduce

      1. Spawn a connect app with a dynamicContent
      2. In the macro's js add this code:
        AP.confluence.getMacroBody(function(data){
            alert(`AP.confluence.getMacroBody - ${JSON.stringify(data)}`);
        });
        
      3. Add the macro in a blog (which forces the user to use the new Confluence editor)
      4. Add something inside the macro and edit the macro
      5. No body is returned, see comparison
      • New editor:
      • Old editor:

      Expected Results

      The macro body is returned

      Actual Results

      An empty body is returned in the callback function

      Notes

      The function returns a macro body when in page view mode:


      References:

      Workaround

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

        1. Snip20190108_37.png
          308 kB
          Anne Calantog
        2. Screen Shot 2019-01-09 at 9.48.45 AM.png
          297 kB
          Anne Calantog
        3. Screen Shot 2019-01-09 at 9.48.01 AM.png
          342 kB
          Anne Calantog

            Assignee:
            Wyatt Barnes (Inactive)
            Reporter:
            Anne Calantog
            Votes:
            18 Vote for this issue
            Watchers:
            22 Start watching this issue

              Created:
              Updated:
              Resolved: