t4t5 / sweetalert

A beautiful replacement for JavaScript's "alert"
https://sweetalert.js.org
MIT License
22.4k stars 2.84k forks source link

multiple rows in subtitle? #770

Open dann1609 opened 6 years ago

dann1609 commented 6 years ago

there is a way to get multiple row in subtitle, I tried some ways described in another issues but no one working.

not working

"\n" "\
"

lionralfs commented 6 years ago

Try using sweetalert v2.1.0, which should automatically replace \n with <br>

axessweb commented 6 years ago

seems not to work with a return json...

Edit: I bypassed using

swal(resJSON.title, (resJSON.message).replace('<br>', "\n"), resJSON.type);