By default, the Joomla! CMS content editor will remove scripts which you try to add to the body of any Article or Custom HTML Module when you select Save or Save and Close.
This is to protect the integrity of your website.
This default setting can however be changed.
If you do then you should take care to either:
- revert to the default setting after adding a script, or
- restrict which users can in future add scripts by configuring the Editor Profiles.
Read more: About Editor Profiles.
What do we mean by scripts?
Javascript, CSS and PHP.
Of these, Javascript is the one that you may most likely want to add to an Article or Custom HTML Module.
Example
Your web host may offer a Mailing List Sign Up feature and provide you with Javascript to add to your website to enable website visitors to sign up to your mailing lists.
Or, maybe you want to embed in an Article the script for your YouTube Channel.
If you upload videos to YouTube and want to present these within your website, you could instead use a 3rd party extension.
Read more: Working with video.
How to prevent a script from being removed
This is a two step process which involves changing the:
- Global Configuration Text Filter settings for a user group, and the
- Content Editor Profile settings for a user group.
Read more: How to prevent scripts from being removed on saving.
Personal Joomla! CMS Help & Support
We coach, help and support managers with responsibility for Joomla! websites in organisations across Cheshire, Manchester, Merseyside, North West England & the UK.