meteor-sweetalert icon indicating copy to clipboard operation
meteor-sweetalert copied to clipboard

Template for sweet alert?

Open BradRyan opened this issue 9 years ago • 0 comments

Being that we can insert html into the Sweet Alert, I was wondering if there was a template that the Sweet Alert is being used in so that I can make some custom event handlers for clickable text in the modal.

Looking to do something like:

Template.Example.events({
    'click #do-something': function() {
        htmlText = "I want to do something when I click <span id='click-me'>here</span>.";

        swal({
            title: "Example",   
            text: customText,
            confirmButtonColor: "#2e9bda",
            confirmButtonText: "Ok",
            closeOnConfirm: true,
            html:true
        });
    }
});


Template.SweetAlert.events({
    'click #click-me': function() {
        swal.close();
        // do other cool stuff here...
    }
})

BradRyan avatar May 29 '15 01:05 BradRyan