Embed
The Embed element shows content from another website, or your own HTML, CSS and JavaScript code, inside a Maglr page. You choose how the content is added with the element's Type setting: iFrame link shows a web page by its link, and Code places pasted embed code on the page.
Adding an Embed element
To add an Embed element to a page:
- In the editor, click
Addin the left panel. - Click
Specials, then clickEmbedor drag it onto the canvas. - Resize the Embed element to fit the content you want to show. A new Embed element starts at 300 × 200 pixels and does not resize itself to its content.
- In the right panel, on the
Elementtab, openSettings(the wrench icon). In theEmbedblock, choose aType:iFrame linkorCode.
Embedding a page with an iFrame link
Use the Embed element's iFrame link type to show a page from another website, such as a form, inside your Maglr page. Visitors see that page in a frame the size of the Embed element.
- Select the Embed element on the canvas.
- In the right panel, on the
Elementtab, openSettings(the wrench icon). In theEmbedblock, setTypetoiFrame link. - Paste the link of the page into the link field, which shows
https://when empty. The link must start withhttps://. - Resize the Embed element to fit the page.
A link that does not start with https:// is not saved, and the panel shows "Use a link that starts with https://".
iFrame link runs without its scripts, so a page that needs JavaScript can look empty or broken there. Check the page in the preview to see it as visitors will.Embedding your own code
Use the Embed element's Code type to place embed code on your page, such as the embed code of a social media post (for example, from X or Instagram), or a small piece of your own HTML, CSS and JavaScript.
- Copy the embed code from the other website, for example from a post's embed option.
- Select the Embed element on the canvas.
- In the right panel, on the
Elementtab, openSettings(the wrench icon). In theEmbedblock, setTypetoCode. - Paste the code into the code box.
- For longer code, click
Open large code window, paste or edit the code in theEdit embed codewindow, and clickSave. Changes in this window apply only when you clickSave. - Resize the Embed element so the content fits, or turn on
Scroll insideunderOptions.
Code in an Embed element with the Code type is placed directly into the published page, not in a separate frame. Its CSS and JavaScript can therefore affect, or be affected by, the rest of the page. If the code is an <iframe> tag, the content inside that frame comes from the other website.
Scrolling inside an embed
By default, an Embed element cuts off any content that is larger than the element. To let visitors scroll that content instead:
- Select the Embed element on the canvas.
- In the right panel, on the
Elementtab, openSettings(the wrench icon) and go to theEmbedblock. - Under
Options, turn onScroll inside.
Scroll inside is available for both the iFrame link and Code types. A page embedded with iFrame link can often scroll inside its own frame already; the setting matters most for Code embeds.
Embeds that use a file on the server
Some existing Embed elements use the File type, which loads a folder of files from the Maglr server. For these Embed elements:
- The folder is chosen in the
File on serverdropdown in theEmbedblock. - Maglr loads the
index.htmlfile at the top level of that folder. - After the files in the folder change, click
Reload embedto show the new version on the canvas in the editor. - Visitors get the changed files without any action in the editor. Their browser can still show a cached copy, so they may need to reload the page more than once to see the update.
New Embed elements offer only the iFrame link and Code types.
Controlling an embedded page with Maglr events
A page shown in an Embed element with the iFrame link type can exchange messages with your Maglr publication, for example to start or stop animations based on Maglr events. On the published page, code in an Embed element with the Code type is not in a frame, so it doesn't use this messaging. For more information, check out the Maglr JS Embed API.
Frequently asked questions
Why does my embedded page look empty in the editor?
In the editor, a page embedded with the Embed element's iFrame link type runs without its scripts. A page that needs JavaScript, such as many forms and maps, can look empty or broken in the editor. Check the page in the preview to see it as visitors will.
Why is my embed cut off?
An Embed element cuts off content that is larger than the element. Resize the Embed element to fit the content. Or select the element, open Settings (the wrench icon) on the Element tab of the right panel, and turn on Scroll inside under Options in the Embed block, so visitors can scroll the content. This matters most for the Code type; a page embedded with iFrame link can usually scroll inside its own frame.
Can I embed a link that starts with http://?
No. The Embed element's iFrame link type only accepts links that start with https://. A link that starts with http:// is not saved, and the panel shows "Use a link that starts with https://".
Why can't I choose File on server for a new embed?
New Embed elements offer only the iFrame link and Code types. Only Embed elements that already use a file on the server have the File type and the File on server dropdown. To embed content in a new Embed element, use iFrame link for a page on another website, or Code for embed code.
Updated on: 29/10/2026