Skip to content

Commit aa98421

Browse files
Merge pull request #2119 from arduino/benjamindannegard/iframe-tutorial-update
[MKC-1760] Updated "embedding create iframes"
2 parents 38cd82d + 292b4a8 commit aa98421

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed
Loading

content/arduino-cloud/04.cloud-editor/embedding-create-iframes/embedding-create-iframes.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,27 @@ description: 'Learn about different methods when embedding your sketches in a we
44
author: 'Karl Söderby'
55
---
66

7-
The Web Editor is a great tool for creating and uploading programs while also collecting all of your sketches in one place. Another great feature is embedding them as iframes, such as articles, blogposts or journals.
7+
The Cloud Editor is a great tool for creating and uploading programs while also collecting all of your sketches in one place. Another great feature is embedding them as iframes, such as articles, blogposts or journals.
88

9-
To embed an iframe is very easy, and we just need to copy and paste a link from our sketch in the Web Editor. But we can also do a series of modifications to that iframe, and in this tutorial we will take a look at how to do that.
9+
To embed an iframe is very easy, and we just need to copy and paste a link from our sketch in the Cloud Editor. But we can also do a series of modifications to that iframe, and in this tutorial we will take a look at how to do that.
1010

1111
## Let's start
1212

13-
First of all, we need to navigate to the [Web Editor](https://create.arduino.cc/editor). If we do not have an account, we can register one with just a few simple steps.
13+
First of all, we need to navigate to the [Cloud Editor](https://create.arduino.cc/editor). If we do not have an account, we can register one with just a few simple steps.
1414

15-
Then, we need to have a code. In this tutorial, we are just going to use the good old **blink** example. When we have our sketch ready, click on the **share** button next to the port selection tool. This will open up a new window, that will have two fields: **link** and **iframe**. Copy the iframe field.
15+
Then, we need to have a code. In this tutorial, we are just going to use the good old **blink** example. When we have our sketch ready, click on the **share** button next to the serial monitor tool. This will open up a new window, that will have two fields: **link** and **embed**. Copy the embed field.
1616

17-
![iframe field](assets/iframe_highlight.png)
17+
![embed field](assets/iframe-highlight.png)
1818

19-
It should look something like this, where `{YOUR_ACCOUNT}` and `{SKETCH_URL}` is replaced by your own credentials.
19+
It should look something like this:
2020

2121
```markup
22-
<iframe src="https://create.arduino.cc/editor/{YOUR_ACCOUNT}/{SKETCH_URL}/preview?embed" style="height:510px;width:100%;margin:10px 0" frameborder="0"></iframe>
22+
<iframe src="https://app.arduino.cc/sketches/examples?eid=01.Basics%2FBlink&view-mode=embed" style="height:510px;width:100%;margin:10px 0" frameborder=0></iframe>
2323
```
2424

2525
This iframe can now simply be embedded in a HTML page, and it will look like this:
2626

27-
<iframe src="https://create.arduino.cc/editor/FT-CONTENT/189d16e1-ba13-421a-9413-7de6e9e46ed7/preview?embed" style="height:510px;width:100%;margin:10px 0" frameborder="0"></iframe>
27+
<iframe src="https://app.arduino.cc/sketches/examples?eid=01.Basics%2FBlink&view-mode=embed" style="height:510px;width:100%;margin:10px 0" frameborder=0></iframe>
2828

2929
But there are many ways we can modify the iframe to look different. So let's take a look the available modifications we can make!
3030

@@ -39,12 +39,12 @@ To do this, we just need to add the following code to the end of the URL:
3939
```
4040
The result is the following:
4141

42-
<iframe src="https://create.arduino.cc/editor/FT-CONTENT/189d16e1-ba13-421a-9413-7de6e9e46ed7/preview?embed&snippet" style="height:510px;width:100%;margin:10px 0" frameborder="0"></iframe>
42+
<iframe src="https://app.arduino.cc/sketches/examples?eid=01.Basics%2FBlink&view-mode=embed&snippet" style="height:510px;width:100%;margin:10px 0" frameborder=0></iframe>
4343

4444
And the full URL should look like this:
4545

4646
```markup
47-
<iframe src="https://create.arduino.cc/editor/{YOUR_ACCOUNT}/{SKETCH_URL}/preview?embed&snippet" style="height:510px;width:100%;margin:10px 0" frameborder="0"></iframe>
47+
<iframe src="https://app.arduino.cc/sketches/examples?eid=01.Basics%2FBlink&view-mode=embed&snippet" style="height:510px;width:100%;margin:10px 0" frameborder=0></iframe>
4848
```
4949

5050

@@ -58,12 +58,12 @@ Next is the highlighting feature. To use this, simply add the following lines to
5858

5959
The result is that line 3 and 4 are highlighted:
6060

61-
<iframe src="https://create.arduino.cc/editor/FT-CONTENT/189d16e1-ba13-421a-9413-7de6e9e46ed7/preview?embed&snippet#L3-L4" style="height:510px;width:100%;margin:10px 0" frameborder="0"></iframe>
61+
<iframe src="https://app.arduino.cc/sketches/examples?eid=01.Basics%2FBlink&view-mode=embed&snippet#L3-L4" style="height:510px;width:100%;margin:10px 0" frameborder=0></iframe>
6262

6363
And the full URL should look like this:
6464

6565
```markup
66-
<iframe src="https://create.arduino.cc/editor/{YOUR_ACCOUNT}/{SKETCH_URL}/preview?embed&amp;snippet#L3-L4" style="height:510px;width:100%;margin:10px 0" frameborder="0"></iframe>
66+
<iframe src="https://app.arduino.cc/sketches/examples?eid=01.Basics%2FBlink&view-mode=embed&snippet#L3-L4" style="height:510px;width:100%;margin:10px 0" frameborder=0></iframe>
6767
```
6868

6969
You can highlight as many lines as you want, and it is easily configurable. For example, if we want to highlight line 1, 3 and 5-8, we simply need to add the following to the URL:
@@ -90,7 +90,7 @@ style="height:200px;width:50%;margin:10px 0"
9090

9191
Which will look like this:
9292

93-
<iframe src="https://create.arduino.cc/editor/FT-CONTENT/189d16e1-ba13-421a-9413-7de6e9e46ed7/preview?embed&snippet" style="height:200px;width:50%;margin:10px 0" frameborder="0"></iframe>
93+
<iframe src="https://app.arduino.cc/sketches/examples?eid=01.Basics%2FBlink&view-mode=embed&snippet" style="height:200px;width:50%;margin:10px 0" frameborder=0></iframe>
9494

9595
## Automatically re-sizing your sketches
9696

@@ -104,9 +104,9 @@ And then using the class `arduino-sketch-iframe` in your HTML element.
104104

105105
## Summary
106106

107-
There are several cool ways of working with iframes from the Web Editor, and it is a really easy process that requires very little coding.
107+
There are several cool ways of working with iframes from the Cloud Editor, and it is a really easy process that requires very little coding.
108108

109-
The Web Editor helps you keep track on all of your sketches, and with the iframes, including your projects on other pages has never been easier.
109+
The Cloud Editor helps you keep track on all of your sketches, and with the iframes, including your projects on other pages has never been easier.
110110

111111
### More tutorials
112112

0 commit comments

Comments
 (0)