-
Notifications
You must be signed in to change notification settings - Fork 740
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTML Config as option #130
Comments
Though there are some alternatives, it would be nice to achieve this in just one line like: |
Works fine for me. |
Thanks, @fglueck, but for some reason, it didn't work for me. Can you please verify it here - https://jsfiddle.net/veeresh/3qywza57/16/ ? |
@drveresh there is no notify-metro loaded in your jsfiddle, so it can't run: 10:47:37.298 Beim Laden von "https://fiddle.jshell.net/veeresh/3qywza57/16/show/?editor_console=" wurde eine ungültige X-Frame-Options-Kopfzeile gefunden: "ALLOWALL" ist keine gültige Direktive. |
I tried this, but now everything is empty without text, and below is the HTML when called:
|
It's there already, please double, both metro js and css are added. Here is the rebase version - https://jsfiddle.net/veeresh/3qywza57/ |
Even " |
With this code notify.js gets initialized with the default style, which is "bootstrap". The "bootstrap" style does not have the ability to render the content as HTML. First you need to make sure that the "metro" style is loaded correctly (or any other style that supports HTML content). With the "metro" style loaded |
@stosef, @fglueck, the fiddle https://jsfiddle.net/veeresh/3qywza57/ now has required libs, but still not working. Can you please clone it and make it work? Notification with Bold/Italic/Links as part of the messages are very basic use cases and it will be better if it can be enabled by default or with an extra ' |
There you go, with Metro style: https://jsfiddle.net/stosef/7ghdue5f/ |
Thanks for the fix. My recommendation is to make the HTML message part of the core API itself by default, else we have to get/set the bootstrap class every time on page load. |
I created a pull request - seems like an easy addon. // Use like:
$.notify("Lorem<br><b>Ipsum</b>", {encode: false}); |
Hi,
Please add a new option "html=true" along with existing ones to render given notification text as HTML, mainly for bold, italic, and other basic and frequently used HTML tags.
Due to this limitation, current we cannot even do anything except passing plain text, and even want to embed a for spinner or loading icon and use it as a notification.
So, there are many use cases to render text as HTML, and I hope you consider this request.
Thanks.
The text was updated successfully, but these errors were encountered: