Content not getting rendered when using RichText | Community
Skip to main content
Level 6
September 1, 2022
Solved

Content not getting rendered when using RichText

  • September 1, 2022
  • 2 replies
  • 919 views

I have created a text component and when I'm trying to enter values in it using RichText, the content is not getting rendered on the page. Please help

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 VeenaVikraman

@sanjana12 Few things to note

 

1. Have you added name to your field ? a property name and value should start with ./

         e.g      ./text

2. If you have given proper naming , then next thing is to use below syntax to see if the value is printing 

      ${properties.text context = 'html'}

 

   When you enter data in the RTE , in the JCR it is stored as paragraph with HTML tags. To display it as WYSIWYG , you need to make sure the HTML tags are rendered properly. @context ='html' will help with the same

 

If you have done both 1 and 2 , and still it is not working, please share a sample dialog.xml and your code you are using to render the data for us to further understand you issues. Also a screen shot of how the data is saved in node will also help. 

2 replies

Pradeep_Kumar_Srivastav
Community Advisor
Community Advisor
September 2, 2022

Hi @sanjana12 , Can you please check the HTML for RTE. There might be some issue in HTML code itself. Otherwise you can share the HTML and community can have a look.

VeenaVikraman
Community Advisor
VeenaVikramanCommunity AdvisorAccepted solution
Community Advisor
September 2, 2022

@sanjana12 Few things to note

 

1. Have you added name to your field ? a property name and value should start with ./

         e.g      ./text

2. If you have given proper naming , then next thing is to use below syntax to see if the value is printing 

      ${properties.text context = 'html'}

 

   When you enter data in the RTE , in the JCR it is stored as paragraph with HTML tags. To display it as WYSIWYG , you need to make sure the HTML tags are rendered properly. @context ='html' will help with the same

 

If you have done both 1 and 2 , and still it is not working, please share a sample dialog.xml and your code you are using to render the data for us to further understand you issues. Also a screen shot of how the data is saved in node will also help. 

Sanjana12Author
Level 6
September 2, 2022

Thank you so much, it's working now