When styling text in Joomla editor we get a lot of extra code and have to go back and clean it out. For example instead of <p> we get:
<p class="p1"><span class="s1">
How do I prevent this from happening?
A content editor for Joomla!®
You need to be logged in to post in the forum - Log In
An active JCE Pro Subscription is required to post in the forum - Buy a Subscription
Please create a new Ticket and we will get back to you as soon as we can.
Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Latest post by Ryan on Friday, 06 September 2024 16:40 BST
When styling text in Joomla editor we get a lot of extra code and have to go back and clean it out. For example instead of <p> we get:
<p class="p1"><span class="s1">
How do I prevent this from happening?
When styling text in Joomla editor
How are you styling the text? Are you selecting something from the Styles list?
Ryan Demmer
Lead Developer / CEO / CTO
Just because you're not paranoid doesn't mean everybody isn't out to get you.
Actually I think I was doing a copy-paste from a text file. I bet using the remove formatting and cleanup HTML or bringing it in as raw text would take care of it. Unfortunately the editors posting new articles aren't that careful.
If the authors are pasting in the content, you can set the Clipboard parameters (Editor Profiles -> Plugin Parameters -> Clipboard) to remove the classes, by setting the Strip Class Attributes option to Yes.
Ryan Demmer
Lead Developer / CEO / CTO
Just because you're not paranoid doesn't mean everybody isn't out to get you.
Will that remove bold, ital, etc. as well?
Also, I don't see 'Clipboard' under Plugin Parameters
No, it will only remove the class attribute, eg: <p class="p1">
becomes <p>
etc.
An easier option is to set the Clean Up Mode option to "Clean HTML". This will paste clean HTML without class or style attributes (but keep <strong>, <em> etc.)
Ryan Demmer
Lead Developer / CEO / CTO
Just because you're not paranoid doesn't mean everybody isn't out to get you.
Also, I don't see 'Clipboard' under Plugin Parameters
You need to ensure the "Cut,Copy,Paste" buttons have been added to the editor toolbar in the Features & Layout tab. This enables those options. You can then "remove" the buttons if required by unchecking them in the Clipboard parameters.
Ryan Demmer
Lead Developer / CEO / CTO
Just because you're not paranoid doesn't mean everybody isn't out to get you.
Your post is being submitted…