Issues with source-edit mode in RTE | Community
Skip to main content
December 22, 2020
Solved

Issues with source-edit mode in RTE

  • December 22, 2020
  • 3 replies
  • 3023 views

Hello Community - I have an issue related to the content(HTML/Text) added in RTE source-edit mode is lost. Once the content is added in RTE and click "Done". I have verified the below. Can someone tell me what is causing the issue?

 

Step 1: Checked content node in CRX/DE and found that the saved changes is not there.
Step 2: Which means it is not related to XSS issue. If it is an XSS issue, the saved HTML will be captured in CRX/DE and it will be removed by XSS.
Step 3: Moreover, this is not a consistent issue. Sometimes, it is working and sometimes it doesn't.
Step 4: Verified the logs once the content is authored in RTE but no issues found in logs when the content is not saved in RTE.
Step 5: No issues found in browser console.

Step 6: Tried with various user accounts including admin but no luck.

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 praveenjain

Can you check once if anything missed in RTE code.

 

Below is the sample code of RTE that you can give a try

 

<headline jcr:primaryType="nt:unstructured" sling:resourceType="/libs/cq/gui/components/authoring/dialog/richtext" fieldDescription="Enter Headline Text" fieldLabel="Headline" name="./headline" useFixedInlineToolbar="{Boolean}true">
<rtePlugins jcr:primaryType="nt:unstructured">
<subsuperscript
jcr:primaryType="nt:unstructured"
features="*"/>
</rtePlugins>
<uiSettings jcr:primaryType="nt:unstructured">
<cui jcr:primaryType="nt:unstructured">
<inline
jcr:primaryType="nt:unstructured"
toolbar="[#format]">
<popovers jcr:primaryType="nt:unstructured">
<format
jcr:primaryType="nt:unstructured"
items="[subsuperscript#superscript]"
ref="format"/>
</popovers>
</inline>
</cui>
</uiSettings>
</headline>

 

Regards

Praveen

3 replies

shelly-goel
Adobe Employee
Adobe Employee
December 22, 2020

@v1101 

Are you using any custom html tags/ attributes in source edit? Do you see the content in the UI after closing the edit dialog?

This would mostly happen if you're trying to add some custom (not allowed) html tags/ attributes.

v1101Author
December 22, 2020
@shelly-goel - We dont use any custom html tags in source edit. Content is showing sometimes and sometimes doesn't. It is not related to custom html tags.
Kunal_Gaba_
December 22, 2020

Is the HTML well formed and balanced ?Check if all the tags are opened and closed correctly. What version of AEM you are running ? Also, try this operation in different browsers as well. 

If there are no custom HTML tags then it could be related to attributes of tag as well. Certain tags or attributes might get removed because of antisamy rules. You can find more details here - https://helpx.adobe.com/experience-manager/kb/target-attribute-issue-tag.html 

v1101Author
December 22, 2020
@kunal_gaba_ - The HTML is well formed. This is happening in 6.5 version. All the tags are properly closed. If it is XSS issue, the values will be saved in crx/de but in my case, the values are not saving in crx/de. This is happening even if we change only the content/text scenarios as well.
praveenjainAccepted solution
December 24, 2020

Can you check once if anything missed in RTE code.

 

Below is the sample code of RTE that you can give a try

 

<headline jcr:primaryType="nt:unstructured" sling:resourceType="/libs/cq/gui/components/authoring/dialog/richtext" fieldDescription="Enter Headline Text" fieldLabel="Headline" name="./headline" useFixedInlineToolbar="{Boolean}true">
<rtePlugins jcr:primaryType="nt:unstructured">
<subsuperscript
jcr:primaryType="nt:unstructured"
features="*"/>
</rtePlugins>
<uiSettings jcr:primaryType="nt:unstructured">
<cui jcr:primaryType="nt:unstructured">
<inline
jcr:primaryType="nt:unstructured"
toolbar="[#format]">
<popovers jcr:primaryType="nt:unstructured">
<format
jcr:primaryType="nt:unstructured"
items="[subsuperscript#superscript]"
ref="format"/>
</popovers>
</inline>
</cui>
</uiSettings>
</headline>

 

Regards

Praveen