Inline macro in Confluence rendered as a block

127 views
Skip to first unread message

Michael

unread,
Sep 17, 2014, 2:30:26 PM9/17/14
to atlassian-...@googlegroups.com
Hi,

I'm trying to implement an inline macro for Confluence Connect 5.6.1. But although I use the options (according to the Connect Doc)

"outputType": "inline",
"bodyType": "none",

my inline macro always gets rendered as a block:



I don't fully understand the instructions at https://developer.atlassian.com/static/connect/docs/modules/confluence/dynamic-content-macro.html concerning resizing either. 

Is there a working example of an inline macro for Connect Express? Or do you have an idea what is wrong with my inline macro?

I know that there have been issues in the past with inline macros in Confluence, but I could not get any useful information in the related issues so far (beside the hint to not use a body for inline macros, as was stated in https://jira.atlassian.com/browse/CONF-24581?jql=text%20~%20%22inline%20macro%22).

Any help would be much appreciated.

Thanks,
Michael

Peter Brownlow

unread,
Sep 17, 2014, 7:09:57 PM9/17/14
to atlassian-...@googlegroups.com
Hi Michael,

Can you post (or email to me) your descriptor and the response that your add-on sends for the screenshot you posted?

-Peter

Travis Smith

unread,
Sep 17, 2014, 7:13:18 PM9/17/14
to atlassian-...@googlegroups.com
Did you set the width & hight of the content either in the descriptor or in your content? If it's 100% it will appear like block content, I had this issue with something I was playing around with a while back. 

--
You received this message because you are subscribed to the Google Groups "Atlassian Connect Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to atlassian-connec...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
-Travis

Michael

unread,
Sep 18, 2014, 1:48:28 AM9/18/14
to atlassian-...@googlegroups.com
Hi,

Thanks for your quick responses. I've set the width and height in my descriptor to a fixed pixel value. The problem was that my iframe nevertheless always got a width of "100%" even though these fixed values were set.

The solution was to set the data-options for all.js as it was mentioned in the Connect Doc. Here's an example for Connect Express:

<script src="{{hostScriptUrl}}" data-options="base: false; margin: false; resize: false" type="text/javascript"></script>

And then in my addon.js file, I now do this (again, this was also mentioned in the Connect Doc actually):

jQuery(document).ready(function() {
    AP.resize(w, h); // width and height of component to render
});


Thanks,
Michael

To unsubscribe from this group and stop receiving emails from it, send an email to atlassian-connect-dev+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
-Travis
Reply all
Reply to author
Forward
0 new messages