Not able to Add a hyperlink in the sweet alert
See original GitHub issueHi Guys,
This is is my code which i am using to add a hyperlink in the text .
swal({ title: 'This is the ', text: '<a href="http://www.externalwebsite.com" target="_blank">externalwebsite.com</a>', html: true, showCancelButton: true, allowOutsideClick: true, goToExternal: true, externalUrl: 'http://www.externalwebsite.com', confirmButtonText: "Continue" });
But it doesn’t come out properly. Here is how it comes

Can you please let me know how can add an anchor tag inside the sweet alert.
Thanks Adi
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Javascript Sweet Alert and html link inside text - Stack Overflow
5 Answers 5 · Unfortunately it is not working. var link = document. · It must work. It's exactly what's written in the...
Read more >How to add link in sweet alert? - Laracasts
I want to add 2 links in sweet alert. but I see this picture. alert()->warning("You must register now. ", 'OK')->html()->persistent("register.
Read more >SweetAlert2 - a beautiful, responsive, customizable and ...
A beautiful, responsive, customizable and accessible (WAI-ARIA) replacement for JavaScript's popup boxes.
Read more >Guides - SweetAlert
Showing an alert. After importing the files into your application, you can call the swal function (make sure it's called after the DOM...
Read more >SweetAlert - UltraEdit
Download & install ; src · "lib/sweet-alert.min.js" ; script · link ; rel · "stylesheet" ; type · "text/css" ; href · "lib/sweet-alert.css" ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hey there,
The reason the
htmlparameter has been disabled is to discourage use cases where the website could potentially be XSS-attacked.However, you should still be able to render raw HTML by passing a DOM node to the
contentparameter, like this:Thanks @t4t5