iFramed

From Atlas Authority, iFramed is the macro that allows any user to easily embed an iFrame into a page. Improve your pages or blog posts with this simple Confluence Macro. 

Screenshot of add-on

HipChat inline with Spotify within a Confluence page.

How to use iFramed:

In two easy steps you can successfully embed an iFrame into your page or post:

  1. Insert the iFrame macro into your Confluence page.
  2. Paste the URL into the iFrame URL box
    basic iframe usage

For further customization, you can adjust the size. Using any of the following unit formats, you can use a size that works best for you:

  • Just the number – 100 (becomes pixels)
  • Number of pixels – 100px
  • Number of ems – 10em
  • Percentage of screen size – 75%

 

Troubleshooting:

If your iFrame comes up as an empty white box it can be one of two things. Try and disable any ad-blockers you are using. If the issue persists, this means that the remote website has explicitly requested that it not be embedded into another site. If you, or someone in your organization controls the remote website, you can make some tweaks to fix this. Take a look at the documentation for this at: https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS#Access-Control-Allow-Origin 

If you get an error message that says:

Please set a valid width.

and / or

Please set a valid height.

This means that you have entered an iFrame size in an invalid format. Please see above for instructions on supported formats.

If you get an error message that says:

Please provide a valid URL

This means that you have provided a malformed URL. Please note that we only support URLs with the HTTP and HTTPS schemes.

(2) Comments
  1. Hi! You state that iFramed can be used “safely”. However, I didn’t find a reference why it is safer than using the HTML macro.
    Thanks!
    Johannes

    1. Thanks for asking about this. The reason why is that with the HTML macro a user can easily inject Javascript directly into the page. Our app only allows injection of an iFrame and is intended to be used in instances where the HTML macro is typically disabled.

Leave a Reply