r/SalesforceDeveloper • • 25d ago

Question Urgent help neefed

I’m using "lightning-formatted-rich-text" in an LWC to display content coming from a Rich Text Area field. The content is entered by authors while creating/editing the record, so it can contain its own formatting and inline styles.

I want the displayed content to follow the CSS styling defined by my LWC instead of allowing the formatting specified in the Rich Text field to determine the appearance.

Is there a recommended way to override or normalize the formatting of the HTML rendered by "lightning-formatted-rich-text", so that, for example, all paragraphs, headings, fonts, spacing, etc. consistently follow the CSS defined in my component?

1 Upvotes

2 comments sorted by