Comments (4)
Can you please give an example of using SA2 when custom HTML isn't working as expected.
from sweetalert2.
swal({ title: 'Confirm?',
text: '<textarea class="form-control" id="notes" placeholder="Notes"></textarea>',
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
html: true,
cancelButtonColor: '#d33',
confirmButtonText: 'Si',
cancelButtonText: 'No',
},
function() {
alert('other ajax stuff');
}
);
from sweetalert2.
You should use SA2 like this:
swal({ title: 'Confirm?',
html: '<textarea class="form-control" id="notes" placeholder="Notes"></textarea>',
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Si',
cancelButtonText: 'No',
},
function() {
alert('other ajax stuff');
}
);
Here's the example from the documentation:
swal({
title: 'HTML example',
html:
'You can use <b>bold text</b>, ' +
'<a href="//github.com">links</a> ' +
'and other HTML tags'
});
from sweetalert2.
I see. I realize I filed a non-existing issue because I inadvertently looked at the documentation of t4t5/sweetalert and assumed the intended behavior was the same. I guess I should be dismissed with a RTFM then. I'm sorry :)
from sweetalert2.
Related Issues (20)
- If you have the right to ask I have the right to ask back: Could you update your support from Ukraine to Palestine? HOT 1
- Please drop your protest ware issue HOT 2
- Copy to clipboard content button HOT 1
- Autor - YOU NAZI HOT 3
- no patch yet for package audit HOT 1
- In earlier versions of Chrome (e.g. Chrome87) pop-ups are not normal. HOT 1
- sweet alert break background layout. HOT 2
- Circle animation for success icon breaks when timing exceeds 4 seconds HOT 1
- Icons invisible with colored-toast HOT 2
- Timer doesn't seem to be working HOT 1
- Can u also update the integrations with js frameworks? HOT 1
- isVisible not false in .then() HOT 2
- Option for Page Scrolling HOT 4
- How can we add Angular component in sweetalert.
- .NET 8 Blazor - Error: There are multiple .NET runtimes present HOT 3
- support russia HOT 2
- Input Types - Email HOT 3
- Wave Tool accessibility errors SweetAlert2 HOT 1
- Partial<SweetAlertOptions> not working when using spreading operator HOT 1
- showLoaderOnConfirm not showing loader HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sweetalert2.