simon peter simon peter - 1 year ago 67
CSS Question

How to stop CSS within a RichText field from overwriting document

I have a

field in my document that displays the content of an incoming mail. I noticed whenever there is an HTML email, the CSS in the email overwrites the color of my links and Glyphicon in almost the entire document.

How can I prevent this from happening?

the RichText Field code:

<xp:inputRichText value="#{document.Body}" id="body1" htmlFilter="identity"> </xp:inputRichText>

Answer Source

You can use

  • a "sanitizer" to clean up RichText's HTML from styling or certain styling OR

  • own CSS classes for your elements.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download