How to put an iFrame into Confluence

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く


目的

An IFrame (Inline Frame) is an HTML document embedded inside another HTML document on a website. The IFrame HTML element is often used to insert content from another source, such as an advertisement, into a Web page.

Although an IFrame behaves like an inline image, it can be configured with its own scrollbar independent of the surrounding page's scrollbar.

Please note that some sites do not work in an iframe. These have cross scripting protection in their headers. For example, Google has

x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block

If these (or similar) are present in the response from the website, then you will not be able to display them in an iframe. Both Google and Facebook are two examples of this. Confluence also has protection to stop itself being displayed. Please see Confluence page does not display in an iframe for more information.


ソリューション

  1. Log in as Confluence Administrator, then
  2. Go to Manage apps at  > Manage Apps
  3. Search for "Confluence HTML Macros" with "All apps" selected in the dropdown
  4. Under "System apps", click on "Confluence HTML Macros" to expand the app details
  5. Expand the modules in the far-right column
  6. Enable the module called "html (html-xhtml)"
  7. The HTML macro is now available. When creating or editing a page, insert the "HTML" macro:
    1. Go to + (Insert more content) > Other macros
    2. Search for the HTML macro
    3. Paste the following code inside the macro, replacing URL with the website you want to include. Modify the other parameters as you see fit.

      Iframe
      <iframe src="URL" noborder="0" width="830" height="800" scrolling="yes" seamless></iframe>
  8. ページを保存します。


Alternatively, there are apps available that provide similar functionality that do not require the HTML macro, can provide a smaller attack surface, and can provide increased security. Please note that Atlassian does not provide support for these apps but they can be used as an alternative if there are security concerns with the HTML macro.

説明

This document outlines the steps needed to insert an iFrame into Confluence. An IFrame (Inline Frame) is an HTML document embedded inside another HTML document on a website.

製品

Confluence

Last modified on Mar 31, 2022

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.