I need to show comment with ellipsis. I have used antd's Paragraph Typography for it. My problem is that comment can also contain html attributes (link to tagged users) so I also need to set dangerouslySetInnerHTML in the component. How to set this in Typography component?
<Paragraph ellipsis={{ rows: 2, expandable: true, symbol: "more" }}>
{comment}
</Paragraph>
I tried using span inside Paragraph to use dangerouslySetInnerHTML, but then ellipsis started showing just "...more" for all long comments, without showing any initial characters in the comment to fill the width. Also getting a warning on using any HTML element inside <Paragraph></Paragragh>
other than string
<Paragraph ellipsis={{ rows: 2, expandable: true, symbol: "more" }}>
<span dangerouslySetInnerHTML={{ __html: comment.comment }} />
</Paragraph>
Any workaround for achieving this??