2

I have a requirement where I need to display my toast message in multiple lines in my LWC. I tried using \n and
but they are not working. Please assist.

2

Have a read of this article on SFDC Monkey that covers this exact issue! (I've used this and it works great)

http://sfdcmonkey.com/2018/05/05/multiline-toast-message-lightning-component/

  • 1
    You cannot use it in LWC - cannot modify elements from shadow DOM – salesforce-sas Sep 18 at 8:10
  • I am facing the same issue as I am using LWC here. @David can u suggest a way to make it work in LWC. – arpit gupta Sep 18 at 10:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.