How to Stop the Joomla Editor From Removing Code
Solution #1. Change the Joomla Text Filter option
This solution works if you are the Super User, and you will be using the default editor TinyMCE.
 
The thing is your TinyMCE editor has its own sitewide option called "Use Joomla Text Filter", which by default is set to Off. The Text Filter prohibits side use of the “script”, “applet” and “iframe” code tags (one of which, namely “iframe”, we tried to insert just a few minutes ago)