You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/educators/how-tos/course_development/exercise_tools/create_iframe.rst
+32-7Lines changed: 32 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,15 +22,18 @@ component. You can also add text and images both before and after the iframe.
22
22
23
23
#. In the visual editor toolbar, select **HTML**.
24
24
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
26
26
HTML includes the ``<iframe>`` element.
27
27
28
28
.. code-block:: html
29
29
30
-
<p><iframesrc="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
+
<iframetitle="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>
31
34
32
35
#. 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
34
37
URL of the page that contains the exercise or tool. **This URL must start
35
38
with https**. Make sure that you do not delete the quotation marks that
36
39
surround the URL.
@@ -41,7 +44,7 @@ component. You can also add text and images both before and after the iframe.
41
44
``<iframe>`` tags. Learners see this text only when they use a browser that
42
45
does not support iframes.
43
46
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
45
48
:ref:`visual editor<The Visual Editor>`.
46
49
47
50
#. 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.
99
102
For example, compare how the different settings in each of the ``<iframe>``
100
103
elements below affect the iframe.
101
104
105
+
In this first example, setting ``scrolling="yes"`` enables a vertical scroll bar on the right side.
106
+
102
107
.. code-block:: html
103
108
104
-
<p><iframesrc="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>
:alt:Iframe with only the top half showing and a vertical scroll bar on the
108
121
side.
109
122
:width:500
110
123
124
+
In this second example, setting ``scrolling="no"`` shows only the top half of the iframe with no scroll bar.
125
+
111
126
.. code-block:: html
112
127
113
-
<p><iframesrc="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>
0 commit comments