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

Support is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#116857 Extra HTML Code

Posted in ‘Editor’
This is a public ticket

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

dagroupinc

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?

Ryan

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.

dagroupinc

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.

Ryan

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.

dagroupinc

Will that remove bold, ital, etc. as well?

Also, I don't see 'Clipboard' under Plugin Parameters

Ryan

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.

Ryan

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.