I have a content fragment with multiline text field as one of the element in it. When I give any description in that, it is storing inside <p> tag and  (for blank spaces). I want to store this contentElement as a json alogng with other content fragment elements.
How can i pass this multiline text to backend java ignoring these <p> and   tags. Below is screenshot of how the multiline text is getting saved in CRX. Need help on this
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @MayurSatav @parthibanselvam
From the above article removeSingleParagraphContainer attribute was for the Classic UI and deprecated.
As per my understanding, there isn’t anything OOTB available that can remove the p single paragraph container tag, to achieve this, one can deal with Sling Model.
Perfect Reference: https://sourcedcode.com/blog/aem/aem-richtext-remove-p-tag-removesingleparagraphcontainer-for-touch-...
Regards,
Santosh
Why do you want to store data in JSON format? If your intention is to expose data in JSON format eventually - that is OOTB.
Have a look at below few links
2. https://m.youtube.com/watch?v=al7k9c81lTM
3. https://www.aemtutorial.info/2017/06/aem-content-fragment-output-as-json.html?m=1
However, if you still wants to customize it you can do it by extending content fragments for more details please visit this article
Similar requirement: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/p-tag-removal-from-text-co...
Hope that helps you!
Regards,
Santosh
hi @parthibanselvam ,
Please check the below solution, I hope it will solve your problem.
https://stackoverflow.com/questions/17965276/disable-auto-adding-of-p-tag
Hi @MayurSatav @parthibanselvam
From the above article removeSingleParagraphContainer attribute was for the Classic UI and deprecated.
As per my understanding, there isn’t anything OOTB available that can remove the p single paragraph container tag, to achieve this, one can deal with Sling Model.
Perfect Reference: https://sourcedcode.com/blog/aem/aem-richtext-remove-p-tag-removesingleparagraphcontainer-for-touch-...
Regards,
Santosh