How to add more html to sweetalert after html to content update? - sweetalert2

I saw previously you could edit the html portion of the sweetalert, but now that has been changed to content instead of doing raw html. Is there a way to go back to using html or another way of adding in an input. I saw in another post that it may be better to just use a modal instead.
https://github.com/sweetalert2/sweetalert2/issues/451 here is the guide with the html.

You are using SweetAlert2.
The plain HTML option still exists.
This is used as follows:
swal({
title: 'Title',
html: 'A custom <span style="color: #F8BB86">html<span> message.'
});
Javascript Sweet Alert and html link inside text

Related

CKEDITOR extra html tag when paste from word

I have blog page in my website and website try to write content with CKEDITOR and copy it from word but when the content publiched, the html have too many extra tag that the are not useful.
how can we filter and delete extra tag and just save main html tag for blog page
thank you
As you did not provide any code sample, its hard to find out your problem. From my understanding I am writing this answer. Hope this will help.
When you save the text from the CKEDITOR fields, it saves text and HTML tags as well. So while viewing the saved texts, you can use the Laravel blade engine print function like this.
{!! $variale->field_name !!}
It will remove the HTML tags and only the text will be shown.

ckeditor display <p>Text</p> instead of displaying HTML

Ck-editor is not displaying my content as HTML instead it displaying with HTML tags.
I have initialize ck-editor by below code:
$(document).ready(function() {
CKEDITOR.replace('long_description');
});
Please check form_helper file. May be html_escape will be problematic. Please try by removing this html_escape and let me know if it works.

CKEditor alters content

When I save my content, it changes things that I don't want to be changed. How can I make it so it would just save my content without changing anything?
Content before saving:
<a anything</a>
After save, the above example becomes:
<a a="" anything=""> </a>
I'm trying to find a config option that would make it so when I save my content, it would save it just as it is - without adding anything of its own.
This <a anything</a> is not a valid HTML and CKEditor works only with a valid HTML. So once you try to load this content into CKEditor it (or the browser) tries to fix it.
Quoting CKEditor basic concepts:
CKEditor is not a tool that will let you input invalid HTML code. CKEditor abides by W3C standards so it will modify code if it is invalid.

CKEditor HTML Autocorrection Issue

I have few lines of HTML in my database. I want to edit the content in CKEditor. But when I open that in editor the HTML gets break down. The HTML gets rearranged.
Below is the HTML which is in database:
<span class="sec_title">
<h1><span>Web</span> Engineering</h1>
<hr>
</span>
And when I open it in CKEditor the HTML looks likes below:
<h1><span class="sec_title"><span>Web</span> Engineering</span></h1>
<hr />
Some one please help me. I tried config.allowedContent = true; but it is also not stopping the CKEditor to do the modifications.
CKEditor works with a valid HTML only and <h1> is not a valid content of <span>. Quoting CKEditor basic concepts:
CKEditor is not a tool that will let you input invalid HTML code. CKEditor abides by W3C standards so it will modify code if it is invalid.

html from asp.net mvc3 not rendered properly in jquery ui dialog

I am having a jquery ui dialog which takes html from a partial view from an asp.net mvc3 controller.
The jquery call is very simple:
$(result).appendTo("#vierge");
$("#vierge").dialog();
where the result of the partialView is as follow:
<p><span style="background-color: yellow; "> test test</span></p>
When I make an alert of the result I am having this:
But the dialog display nothing, for you what could be wrong with my code ?
Thanks alot for your help
ps: I am trying to load the dialog another way:
$(dialogDiv).load(href)
.dialog({
autoOpen: true,
});
the dialog open ok, but it display plain html code instead of the rendered html, such as this
You are missing $ sign in the first line, it should be like this:
$(result).appendTo("#vierge");
$("#vierge").dialog();
if you don't need to append result but only display it in a dialog box, you can use this code:
$('#vierge').html(result);
$("#vierge").dialog();

Resources