If a content administrator pastes text containing styling into the editor in Joomla, the formatting is kept as it is in the source (another web page or a Microsoft Office Word document for example). The general idea using a template on a website is that the template should control the looks of headers, paragraphs etc. By keeping the formatting on the pasted text, it will cause your website to have a variety of fonts, styles and sizes.
It can also be a problem when a content administrator receives text material for the website, it can be written in Microsoft Office Word, causing a paste to include unwanted formatting, like the class=”MsoNormal” (Mso = Microsoft Office formatting).
This solution removes all class and style tags from the content. This means the user will no longer be able to set a different font style or size on the content. So that will be entirely controlled by the template. However, if you as the super super admin, who knows what you are doing, need to be able to create content with class and style you can add an unfilterered group for your own account. Note that if your content then is being edited and saved by a filtered user, your classes and styles will be lost.
We assume for this example that all content administrators are Super Users.
- Go to System -> Global options -> Text filters
- For Super Users, select Filter type = My own blacklist
- In the column Filter tags enter span
- In the column Filter attributes enter class,style
- Click Save
If you need to be able to save unfiltered content for a user, such as yourself, do this:
- Go to Users -> Groups
- Click New to add a new group
- Name it Unfiltered and make it a subgroup to Super Users
- Click Save & Close
- Go to Users -> Users
- Click on the user you want to edit (presumbaly yourself)
- Click on the Groups tab
- Unselect Super Users and select Unfiltered (make sure it really is a subgroup to Super Users, otherwise you have just removed your accounts super users priviliges)
- Click Save & Close
- Go to System -> Global settings -> Text filters
- Make sure the group Unfiltered has No filtering selected as Filter type
- Click Save