on 2021 Jul 21 3:26 AM
Hi All,
We are migrating from Hybris 1905 to 2011. After migration, we are facing an issue with smartedit paragraph editor. In 1905 we were able to add style using styles like the below code. It used to reflect the change also it used to save this change.
<style>p {background-color:red;}</style>
But in 2011 it is not supported. I can see a new field has been introduced in 2011. Below is the snap-shot. Can someone please share how to put styles using the new field?

Regards,
Amrita
Request clarification before answering.
Hey There!
The "Style Classes" field in SmartEdit is used with Composable Storefront (formerly known as Spartacus) which will store style class information, so the storefront can apply render logic based on it.
You are probably facing this unwanted behavior with the HTML in paragraph component due to before 1905.19, CKEditor.config.allowedContent is always true in CKEditor config which enables the inline style. For security reason there was introduced new property "cms.components.allowUnsafeJavaScript" in SmartEdit. The property is set to "false" by default, requiring to set it to "true" to be able to inject HTML scripts in paragraph components.
Kind Regards,
Wesley
SAP Commerce Cloud Product Support - Brasil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.