I saw that you could use the content option, but im not really sure how to go about that right now I have something like:
swal({title: 'hello', text: 'hello ${<strong>{name}</strong>}', icon: 'success' })
Or, you can use SweetAlert2 - the supported fork of original SweetAlert:
Swal.fire({
html: 'Overengineering is <strong>a bad thing</strong>'
})
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
PS. notice that SweetAlert2 is a little bit different from SweetAlert, check the simple migration guide: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With