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.

#106148 Stripping HTML Formatting and Styling Codes

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 Tuesday, 22 December 2020 12:56 GMT

csknight
Hi,

We want to provide very basic front end HTML editing (Bold and Underline and Bullet list) and do not want to include the Clipboard buttons in the editor.
We do not want the user to include HTML codes such as style, fonts, etc.
We especially want to strip these HTML codes when the user execute a cut & paste from a HTML/Word source.

How can we do that? Thanks.

Ryan
Attached is a "simple" profile that I think meets your needs.

Download and unzip, then import into Editor Profiles - https://www.joomlacontenteditor.net/support/documentation/profiles/profiles-import

This is a front-end only profile, but you can change that and any other options, including which User Groups it is assigned to, in Editor Profiles -> Setup. You will neebd to set the profile to "published" after import.

Attachments

simple_profile.zip

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

csknight
Hi,

Thanks for the sample profile.
This solution requires the Clipboard.
Is it possible to do without the Clipboard and set at the Cleanup HTML level?
Possible to use the Prohibited Elements/Attributes/Values, etc?

Thanks.

Ryan
Please try JCE Pro 2.9.2 RC4 - https://www.joomlacontenteditor.net/downloads/editor/pro/development

In the profile I sent you, uncheck all the Clipboard buttons in Editor Profiles -> Plugin Parameters -> Clipboard.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

csknight
Hi,

Is there any additional configuration required in the Editor Params?

I've tried setting Prohibited Elements with "class, style". But can still paste the different font formatting in the editor.

Ryan
You need to ensure that the Clipboard buttons are added to the editor toolbar in the Features & Layout tab (this activates the clipboard options), but you can then remove the individual buttons for the Clipboard in the Clipboard parameters.

The attached profile includes this change.

Attachments

simple_profile.xml.zip

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.