Skip to content

Commit 1daeccd

Browse files
committed
Update IFrame docs
Resolves #1167
1 parent c4f6f3a commit 1daeccd

1 file changed

Lines changed: 32 additions & 7 deletions

File tree

source/educators/how-tos/course_development/exercise_tools/create_iframe.rst

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,18 @@ component. You can also add text and images both before and after the iframe.
2222

2323
#. In the visual editor toolbar, select **HTML**.
2424

25-
#. In the HTML source code editor, locate the following HTML (line 7). This
25+
#. In the HTML source code editor, locate the following HTML. This
2626
HTML includes the ``<iframe>`` element.
2727

2828
.. code-block:: html
2929

30-
<p><iframe src="https://studio.edx.org/c4x/edX/DemoX/asset/eulerLineDemo.html" width="402" height="402" marginwidth="0" marginheight="0" frameborder="0" scrolling="no">You need an iFrame capable browser to view this.</iframe></p>
30+
<iframe title="The required title of the tool"
31+
src="The URL of the tool, starting with https://">
32+
Message displayed when the browser does not support IFrames.
33+
</iframe>
3134

3235
#. Replace the default URL in the ``src`` attribute
33-
(``https://studio.edx.org/c4x/edX/DemoX/asset/eulerLineDemo.html``) with the
36+
(``The URL of the tool, starting with https://``) with the
3437
URL of the page that contains the exercise or tool. **This URL must start
3538
with https**. Make sure that you do not delete the quotation marks that
3639
surround the URL.
@@ -41,7 +44,7 @@ component. You can also add text and images both before and after the iframe.
4144
``<iframe>`` tags. Learners see this text only when they use a browser that
4245
does not support iframes.
4346

44-
#. Select **OK** to close the HTML source code editor and return to the
47+
#. Select **Save** to close the HTML source code editor and return to the
4548
:ref:`visual editor<The Visual Editor>`.
4649

4750
#. In the visual editor, replace the default text with your own text.
@@ -99,18 +102,38 @@ You can add these attributes in any order you want.
99102
For example, compare how the different settings in each of the ``<iframe>``
100103
elements below affect the iframe.
101104

105+
In this first example, setting ``scrolling="yes"`` enables a vertical scroll bar on the right side.
106+
102107
.. code-block:: html
103108

104-
<p><iframe src="https://studio.edx.org/c4x/edX/DemoX/asset/eulerLineDemo.html" width="442" height="200" marginwidth="20" marginheight="20" frameborder="1" scrolling="yes">You need an iFrame capable browser to view this.</iframe></p>
109+
<iframe src="https://studio.edx.org/c4x/edX/DemoX/asset/eulerLineDemo.html"
110+
width="442"
111+
height="200"
112+
marginwidth="20"
113+
marginheight="20"
114+
frameborder="1"
115+
scrolling="yes">
116+
You need an iFrame capable browser to view this.
117+
</iframe>
105118

106119
.. image:: /_images/educator_how_tos/IFrame_3.png
107120
:alt: Iframe with only the top half showing and a vertical scroll bar on the
108121
side.
109122
:width: 500
110123

124+
In this second example, setting ``scrolling="no"`` shows only the top half of the iframe with no scroll bar.
125+
111126
.. code-block:: html
112127

113-
<p><iframe src="https://studio.edx.org/c4x/edX/DemoX/asset/eulerLineDemo.html" width="550" height="250" marginwidth="30" marginheight="60" frameborder="1" scrolling="no">You need an iFrame capable browser to view this.</iframe></p>
128+
<iframe src="https://studio.edx.org/c4x/edX/DemoX/asset/eulerLineDemo.html"
129+
width="550"
130+
height="250"
131+
marginwidth="30"
132+
marginheight="60"
133+
frameborder="1"
134+
scrolling="no">
135+
You need an iFrame capable browser to view this.
136+
</iframe>
114137

115138
.. image:: /_images/educator_how_tos/IFrame_4.png
116139
:alt: Iframe with only the top half showing but no scroll bar available.
@@ -131,5 +154,7 @@ For more information about iframe attributes, see
131154
+--------------+-------------------------------+----------------+---------------------------------------------------------------+
132155
| Review Date | Working Group Reviewer | Release |Test situation |
133156
+--------------+-------------------------------+----------------+---------------------------------------------------------------+
134-
| 07/01/2025 | Leira (Curriuce.me | Sumac | Fail (https://github.com/openedx/docs.openedx.org/issues/1167)|
157+
| 2026-04-07 | sarina | Verawood | Pass |
158+
+--------------+-------------------------------+----------------+---------------------------------------------------------------+
159+
| 07/01/2025 | Leira (Curricu.me) | Sumac | Fail (https://github.com/openedx/docs.openedx.org/issues/1167)|
135160
+--------------+-------------------------------+----------------+---------------------------------------------------------------+

0 commit comments

Comments
 (0)