I want to take confluence wiki content and embed into another site via iframe.

How do I do this? How do I embed Confluence content into another site? Specifically into Jive, which has HTML tiles.. I tried, but it is not working.

5 answers

1 vote

An iframe will pull in a whole web page.  Confluence will serve up whatever pages you want, as though you were looking in a browser, and it works fine with iframes, so whatever you're doing wrong, it's wrong in Jive, not Confluence.

(I would also point out that although I've said "it works fine", that's a technical point.  It's actually really ugly because you get everything - header, footer and the rest.  And you need to be logged in unless the pages are anonymously accessible. It's literally what you'd get in the browser, but in a small box)

Did you ever get this working?  We haven't been able to.  Are there security restrictions in a Confluence page that prevent it from displaying in an iFrame from a different domain?  

I'm having the same issue. I used to be able to embed a confluence page into another site's iFrame, but after the last upgrade going from 5.8.4 -> 5.9.12 ... it stopped working.  I get the following error now:

Screen Shot 2016-06-15 at 10.52.31 AM.png

Is there a security configuration that I would need to change for confluence to allow itself to be embedded in an iFrame?

Also, you mentioned above about the header and side-bar being embedded and how that's really ugly.  There is a script you can use on your confluence page to prevent the extra navigation elements from displaying (only if it's being embedded as an iFrame): 

<script type="text/javascript">
function inIframe () {
try
{ return window.self !== window.top; }
catch (e)
{ return true; }
}

AJS.toInit(function(){
if (inIframe()) {
AJS.$('header').hide();
if (AJS.$("div.ia-fixed-sidebar").width() > 55)
{ AJS.Confluence.Sidebar.toggle(); }
}
else
{ console.log("Detected OUTside iFrame"); }
});
</script>

And you could get this into a custom macro and include this on any pages you want to behave this way.  

And it used to work, but now after the upgrade, it does not.  Any ideas? 

I am wanting an answer to this too... Is there anything I need to do in Confluence to enable pages to be embedded elsewhere?

Since 5.9, confluence is by default protected against the click-jacking.

This behavior can be changed by setting a property. But Atlassian basically advised that it will void your support contract if you have one.

https://confluence.atlassian.com/confkb/confluence-page-does-not-display-in-an-iframe-827335781.html

 

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,811 views 26 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you