Construct RTE HTML in Sling Model and display in sightly. | Community
Skip to main content
Level 2
October 25, 2023
Solved

Construct RTE HTML in Sling Model and display in sightly.

  • October 25, 2023
  • 1 reply
  • 778 views

Hi Team, 

 

I have a requirement, where I have to construct the RTE data which is table information in Sling model with some data from third party service. Is it a good approach to concat the table html as a string and use that to display in sightly. 

 

I don't think, I need any jsoup parser for this approach. Please share your thoughts.  

 

regards,

Archana.

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 arunpatidar

Hi @archr 
Yes, you can store the table in JCR, example is table RTE plugin.

1 reply

arunpatidar
Community Advisor
Community Advisor
October 26, 2023

Hi @archr 
Sure, go ahead with Jsoup, we also did something , reading RTE data from text node and converted into Table Model

 

org.jsoup.Jsoup;
org.jsoup.nodes.Element;

Arun Patidar
ArchRAuthor
Level 2
October 27, 2023

Actually, we have to construct the table html from backend java and send it to  the frontend.. That is the reason, i was confused if i need a parser like jsoup or will be able to achieve with String builder to store the html String under the jcr:content text property. which can then be rendered by text component

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
October 30, 2023

Hi @archr 
Yes, you can store the table in JCR, example is table RTE plugin.

Arun Patidar