sweet-alert display HTML code in text

前端 未结 11 1338
梦谈多话
梦谈多话 2020-12-24 01:52

I am using sweet-alert plugin to display an alert. With a classical config (defaults), everything goes OK. But when I want to add a HTML tag into the TEXT, it display

11条回答
  •  眼角桃花
    2020-12-24 02:35

    The SweetAlert repo seems to be unmaintained. There's a bunch of Pull Requests without any replies, the last merged pull request was on Nov 9, 2014.

    I created SweetAlert2 with HTML support in modal and some other options for customization modal window - width, padding, Esc button behavior, etc.

    Swal.fire({
      title: "Title", 
      html: "Testno  sporocilo za objekt: test",  
      confirmButtonText: "V redu", 
    });

提交回复
热议问题