Is there any way to display HTML in a Toast popup?
I'd like to display a list of error messages, and not just a single string.
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community
Toast event can only have string message. Even if you try to pass html in message, it will be interpreted as text. You can use multiple toast events to show all the errors you have. Or, you can create your own toast component using the lightningdesignsystem toast blueprint. Add a slot inside the div with class slds-notify__content. You can add it wherever you want and control its rendering with the if:true directive.
<div class="slds-notify__content"> <slot></slot> </div>