Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

Construct RTE HTML in Sling Model and display in sightly.

Avatar

Level 2

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.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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



Arun Patidar

View solution in original post

3 Replies

Avatar

Community Advisor

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

Avatar

Level 2

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

Avatar

Correct answer by
Community Advisor

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



Arun Patidar