Search Our Knowledgebase

  • Joomla
  • Video
  • WordPress
Or ask a question in our official product support forum boards

Editor Stripping Source Code

How to prevent 3rd party editors from removing source code in modules/articles

As many of you have probably experienced before certain editors often strip coding you add via the Module/Article Manager upon submission. Unfortunately this occurs with default editor settings and often requires some minor tweaks to the plugins themselves to prevent this from happening.

Editors you might expect to experience these types of issues on are JCE and TinyMCE. There are also a few smaller 3rd party editors out there that this might occur on but you can follow the guidelines below or contact their developers to achieve a similar result.

The Problem:

When adding coding such as icons to an HTML element the code will often look something like this.

<span class="ion-android-alarm"></span>

<a href="" class="ion-android-alarm"></a>

The problem is that 3rd party editors will generally strip coding that has no physical content or text inside. Upon submission the above coding will just be completely removed from the article/module preventing it from displaying properly. There are a couple ways to combat this which are detailed below:

Solution #1 -

When ever you are adding or modifying a module that uses coding such as the examples above, change your editor in the Global Configuration to either "None" or "Code Mirror". After you are done adding your code hit "Save" and then you can swap your editor back to your preferred option.

Solution #2 -

Many of the top editors allow you to customize or add exclusions that prevent your source from being stripped upon submission. One of the most common editors that users will have issues with is the default TinyMCE or JCE editor. The good news is you can add exclusions for this editor that will prevent your coding from being stripped by default.

TinyMCE/JCE Editor

  • In the Joomla backend go to Extensions > Plugin Manager
  • Find or Search for TinyMCE and click on it
  • Go to Plugin > Extended Valid Elements.
  • Add the following values to the input box
  • +a[*],+i[*],+em[*],+li[*],+span[*],+div[*]
  • Save your changes and close the module

Solution #3 -

Another common reason certain elements get stripped is if your Joomla Configuration is using Text- Filters for your user group for security. This can prevent certain elements like iFrames or YouTube videos from loading properly. To ensure this doesn't occur on your site navigate to System > Global Configuration > Text Filters and ensure that this is set to "None" for your specific user group.

If you still have issues after following the details above with your coding getting stripped we suggest contacting the developers for the editor you are using for direct exclusion instructions.

Looking for the largest variety in template designs? Look no more. Never buy 1 theme again. Signups start at just $89 for access to all of our themes.
Send Us An Email
Please send us your questions and we will email you back as soon as we can. Product support questions should be posted in our support forums under the Help menu. Our staff will assist you from there.