When you embed an Iframe into Joomla 4, have you ever got the problem that you cannot save the module and article, or the iFrame code is removed after saving? This happens since Joomla has text filters that will delete the iFrame code by default. With the aim of helping your site safer, the Joomla text filters are necessary.
However, if you desire to insert an iframe code of videos or maps, you can adjust the text filters. So, in the blog today, we will guide you on how to make the Iframe code properly work on your Joomla 4 site. Thanks to it, you are easily and simply able to add the iframe code of Youtube or Google Maps on your site to make it more vivid and impressive. Let’s start now!
How to Embed an Iframe into Joomla 4
There are 2 ways for you to embed an iframe into Joomla 4. You can do that by selecting the No filtering option in the Global Text Filters. Besides, you can also modify the text editor to allow the iframe code.
Using Global Text Filters
First of all, you need to change the Filter Type of the user in the Global Configuration. In order to do that, you need to go to System -> Global Configuration.
In the Text Filters tab, you will choose the users that you want to allow to add the iFrame code into the custom HTML modules or articles. For example, we will set this ability for the Administrator. So, in the Filter Type box next to the Administrator, simply select the No Filtering option.
Don’t forget to save the settings.
Enabling iFrame Code in Text Editor
The second method for you to embed an Iframe into Joomla 4 is enabling the iFrame Code in the Text Editor.
If you are using TinyMCE editor, let’s access System -> Plugins (in the Manage tab).
After that, simply enter the name of the editor you are utilizing in the search box. Then, simply click on it to edit.
Select the type of Set first: Set 0 (assign for Administrator, Editor, and Super Users), Set 1 (assign for Manager and Registered), and Set 2 (assign for Public).
Once choosing the Set type, let’s scroll down to find the Prohibited Elements option and delete the ‘iframe’ in the list of prohibited elements.
Finally, save all your changes with the save or save & close button at the top of the screen.
If you are utilizing the JCE Editor, you will allow the user to embed the iframe in Joomla 4 by going to Components -> JCE Editor -> Profiles -> Default.
In the Plugin Parameters tab, let’s find the Media Support section which is in the left column of the screen.
Next, simply set the Yes option for the Allow iFrames. Eventually, save all your changes.
Everything is done. Now, you can easily create a new article or custom HTML module and add any iframe code you want.
In conclusion, we hope that the blog today will support you to fix the error that you can’t embed an iframe into Joomla 4. By using the 2 methods we show you above, it’s fast and convenient for you to add the iframe code of Youtube or Google Maps to your site to attract more visitors. Besides, if you are looking for the instruction to switch the TinyMCE editor to another one, let’s explore the way to switch the editor in Joomla 4 here.
Moreover, in case you want to generate good articles as well as effectively manage them, learn more information about how to create and manage articles. Last but not least, we are providing many responsive and SEO-friendly Joomla 4 Templates. So, don’t hesitate to take a look and get the best one!
- How To Make A Name For Your Brand In The Digital Era - August 3, 2022
- 8+ Useful WordPress Gutenberg Form Builder Plugins in 2022 - July 20, 2022
- How to Easily Use WordPress Reusable Blocks - July 18, 2022