0

I'm currently using lightning-formatted-rich-text in LWC to display content of case comments. However when user reply to case through email, replied text is stored in case comments which are not displayed with proper formatting in lightning-formatted-rich-text. This component is not able to display email reply text with texts in separate lines as it was originally composed by user. When viewing same case in lighting experience, email reply is displayed with formatting.

Email reply displayed in lightning-formatted-rich-text:

Hello, I'm replying for my case. Thanks >> Case#123456 is open > > Thank you for opening

Email reply displayed in case comments section in lightning experience while opening the case:

Hello,

I'm replying for my case.

Thanks

>
>Case#123456 is open 
> 
> Thank you for opening

Anyone has faced this problem? How can I format email reply text so that text are formatted in separate lines in lightning web components?

2
  • what are you doing in your LWC to grab the CaseComment? Are you calling an apex method, wire, etc. Have you checked what console.log() looks like and whether the comment field has the html tags or not? Commented Jul 15, 2021 at 19:15
  • Hi Kris, thanks for the comment. I'm calling an apex method. I checked how email reply text are by querying Comment body in CaseComment object using query editor--no html tags.
    – Subodh S
    Commented Jul 16, 2021 at 20:38

0

You must log in to answer this question.

Browse other questions tagged .