How to render a different macro preview in edit mode than in view mode

Is there any way I can detect that my macro is being shown in edit mode and return a different macro than in view mode? I’m currently using the url property for my dynamicContentMacro in my descriptor, which is always called, regardless of which mode the macro is rendered in. I had a look at the query parameters, but they are the same. How can my controller figure out which mode the macro is in?

1 Like

See Dynamic Content Macro.
There is a “output.type” you can receive
Declaring in atlassian-connect.json something like

"url": "/mymacro/{content.id}/{content.version}/{output.type}/{macro.id}/"
3 Likes

Amazing, thank you :slight_smile: