Hidden HTML tags showing in Rich Text Editor

Certified Senior Developer

I am trying to show HTML data in rich text editor but the html we are receiving from api has some hidden tags with visibility: hidden.

I know that hidden items still take up space in the layout but the content is hidden. Rich text editor is not hiding those elements or tags. The data and elements inside those hidden tags are still visible in editor.

Any possible way to resolve this? Also, how to make rich text editor open hyperlinks in another tab rather than in same editor window?

  Discussion posts and replies are publicly visible