SweetAlert html option not working

Sweet alert with html option is not working can you guys explain me to solve this.or otherwise i want to bind template explicitly to sweet alert.

    swal({
        title: "Are you sure?",
        text: '<b>Hiiii</b>' ,
        type: "info",
        showCancelButton: true,
        confirmButtonColor: "#F44336",
        confirmButtonText: "Yes, accept it!",
        closeOnConfirm: true
        html:true
    }, function() {
        $scope.onComment(record);
    });

Can you people help me to solve this sweet alert problem?

Upvotes: 1

Views: 8218

Answers (2)

米米米
米米米

Reputation: 990

I found out how to do it in the new Version. Please see the information below.

sweet-alert display HTML code in text

Upvotes: 0

federico scamuzzi
federico scamuzzi

Reputation: 3778

as Doc says :

html is no longer used. Instead use the content object.

(https://sweetalert.js.org/guides/)

try:

swal({
  content: "input",
});

Upvotes: 1

Related Questions