Text component removing Inline styles | Community
Skip to main content
Level 4
January 19, 2023
Solved

Text component removing Inline styles

  • January 19, 2023
  • 2 replies
  • 2097 views

This issue only occurs in AEM SDK v2023.1.10675.  I have confirmed that it does not occur in any 2022 release.  This issue is confirmed on both cloud managed environments as well as with the quickstart JAR.

 

When using the Text Component, I am settings some text to be aligned in the center.  When I view the raw HTML, I see this:

 

<h2 style="text-align: center;">Hello World</h2>

 

However, when saving this change the text does not get aligned to the center. When I re-open the RTE and check, it is simply this:

 

<h2>Hello World</h2>

 

Additionally, when viewing the published page, I see this markup for the text component:

 

<div data-cmp-data-layer="{&quot;text-afd76d34d8&quot;:{&quot;@type&quot;:&quot;microsoftgamedev/components/text&quot;,&quot;repo:modifyDate&quot;:&quot;2023-01-19T14:07:59Z&quot;,&quot;xdm:text&quot;:&quot;<h2 style=\&quot;text-align: center;\&quot;>Hello World</h2>\r\n&quot;}}" id="text-afd76d34d8" class="cmp-text"> <h2 style="">Hello World</h2> </div>

 

Just based on what I see in data-cmp-data-layer, it appears to be persisted correctly. I can also see it persisted correctly in the JCR...

 

Question:

  • At rendering time the inline styling for text-align: center is being stripped out. What would cause this behavior and where can I look to resolve it? 
  • Is there any way to downgrade versions from the cloud manager console perhaps?

 

Additional Observations:

  • This did not occur until upgrading to the 2023.01 release.
  • I am also noticing that all CMS operations now have a ~5-10 second lag- from saving, to opening dialogs, to adding components... it all lags where it didn't before this version.
  • Other inline styles, such as "color: red" do not get stripped.  Only text align is getting stripped from what I can tell.
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Asutosh_Jena_

Hi @dylanmccurry 

 

This is a known issue with AEM's latest release and it's something we can replicate on AEM SDK as well. Please raise a request with Adobe Support and ask them to roll back to the previous stable version which is 2022.11.9850.20221116T162329Z. I have faced the same issue and we were able to resolve it, by roll back.

 

Thanks,

Asutosh

2 replies

B_Sravan
Community Advisor
Community Advisor
January 19, 2023

Hey, I observed this issue earlier, back then the difference was due to core-components version on the POM file. Can you check the core-components version on the POM file?

Level 4
January 19, 2023

I just upgraded to 2.21.2 and the issue still occurs locally with the cloud quickstart jar.

B_Sravan
Community Advisor
Community Advisor
January 20, 2023

yeah, it appears on local because of the difference in the SDK version to your higher environments, as @asutosh_jena_  mentioned seems like this is a known issue.

I would suggest making use of span tags with inline styling to align the content and check or make use of CSS.

Thanks,
Sravan 

Asutosh_Jena_
Community Advisor
Asutosh_Jena_Community AdvisorAccepted solution
Community Advisor
January 20, 2023

Hi @dylanmccurry 

 

This is a known issue with AEM's latest release and it's something we can replicate on AEM SDK as well. Please raise a request with Adobe Support and ask them to roll back to the previous stable version which is 2022.11.9850.20221116T162329Z. I have faced the same issue and we were able to resolve it, by roll back.

 

Thanks,

Asutosh