When I assign value to the htmleditor at runtime in codebegind as below
Editor1.Content =
"<table border='0' ><tr><td><img src='../../images/ALSK/AlskCover.jpg'></td><td> </td><td><p><h2 style='color:red' align='center'><B>48 HOUR SALE!</B></h3></p><br><p>Subscribe today for spectacular full-color photography of wildlife and scenery from a
land beyond compare. You will receive features from award winning writers, articles about historical events that have shaped this great land, and expert guidance on hunting, fishing, traveling and surviving in the totally unique and unforgettable setting that
is Alaska.</p><p><font color='red'><u>Money Back Guarantee</u></font><br>If for any reason, at any time, you wish to cancel your subscription you may do so and receive a full refund for all unmailed issues.</p></td></tr></table>"
it
creates a border around the table and the content changes to
"<table
style="border-top-color: black; border-left-color: black; border-top-width: 1px; border-left-width: 1px; border-top-style: solid; border-left-style: solid;"><tbody><tr><td style="border-right-color: black; border-bottom-color: black; border-right-width: 1px;
border-bottom-width: 1px; border-right-style: solid; border-bottom-style: solid;"><img src="../../images/ALSK/AlskCover.jpg"></td><td style="border-right-color: black; border-bottom-color: black; border-right-width: 1px; border-bottom-width: 1px; border-right-style:
solid; border-bottom-style: solid;"> </td><td style="border-right-color: black; border-bottom-color: black; border-right-width: 1px; border-bottom-width: 1px; border-right-style: solid; border-bottom-style: solid;"><h2 align="center"><b>48 HOUR SALE!</b></h2><br><br>Subscribe
today for spectacular full-color photography of wildlife and scenery from a land beyond compare. You will receive features from award winning writers, articles about historical events that have shaped this great land, and expert guidance on hunting, fishing,
traveling and surviving in the totally unique and unforgettable setting that is Alaska.<br><font color="red"><u>Money Back Guarantee</u></font><br>If for any reason, at any time, you wish to cancel your subscription you may do so and receive a full refund
for all unmailed issues.<br></td></tr></tbody></table>"
I think.i dont know any solutions. But its not all time past tag's.some time only threw the problem!!! but now we can remove this in postback time.But that is not good. So we can't do this. do u like just look this
If your issue involves copy and pasting - you may have to attempt to capture that event and use Javascript to handle encoding or decoding the string that you are pasting.
But it adds border automatically the one I highlighted below. Why it adds a border automatically.
<table
style="border-top-color: black; border-left-color: black; border-top-width: 1px; border-left-width: 1px; border-top-style: solid; border-left-style: solid;"><tbody><tr><td style="border-right-color: black; border-bottom-color: black; border-right-width:
1px; border-bottom-width: 1px; border-right-style: solid; border-bottom-style: solid;"><img src="../../images/ALSK/AlskCover.jpg"></td><td style="border-right-color: black; border-bottom-color: black; border-right-width: 1px; border-bottom-width: 1px; border-right-style:
solid; border-bottom-style: solid;"> </td><td style="border-right-color: black; border-bottom-color: black; border-right-width: 1px; border-bottom-width: 1px; border-right-style: solid; border-bottom-style: solid;"><h2 align="center"><b>48 HOUR SALE!</b></h2><br><br>Subscribe
today for spectacular full-color photography of wildlife and scenery from a land beyond compare. You will receive features from award winning writers, articles about historical events that have shaped this great land, and expert guidance on hunting, fishing,
traveling and surviving in the totally unique and unforgettable setting that is Alaska.<br><font color="red"><u>Money Back Guarantee</u></font><br>If for any reason, at any time, you wish to cancel your subscription you may do so and receive a full refund
for all unmailed issues.<br></td></tr></tbody></table>"
I tried as susggested
Editor1.Content
= Server.HtmlDecode(myHtmlEditorText);
But it adds border automatically the one I highlighted below. Why it adds a border automatically.
<table
style="border-top-color: black; border-left-color: black; border-top-width: 1px; border-left-width: 1px; border-top-style: solid; border-left-style: solid;"><tbody><tr><td style="border-right-color: black; border-bottom-color: black; border-right-width:
1px; border-bottom-width: 1px; border-right-style: solid; border-bottom-style: solid;"><img src="../../images/ALSK/AlskCover.jpg"></td><td style="border-right-color: black; border-bottom-color: black; border-right-width: 1px; border-bottom-width: 1px; border-right-style:
solid; border-bottom-style: solid;"> </td><td style="border-right-color: black; border-bottom-color: black; border-right-width: 1px; border-bottom-width: 1px; border-right-style: solid; border-bottom-style: solid;"><h2 align="center"><b>48 HOUR SALE!</b></h2><br><br>Subscribe
today for spectacular full-color photography of wildlife and scenery from a land beyond compare. You will receive features from award winning writers, articles about historical events that have shaped this great land, and expert guidance on hunting, fishing,
traveling and surviving in the totally unique and unforgettable setting that is Alaska.<br><font color="red"><u>Money Back Guarantee</u></font><br>If for any reason, at any time, you wish to cancel your subscription you may do so and receive a full refund
for all unmailed issues.<br></td></tr></tbody></table>"
You copy the content in any website.That website html design is set border.So u past the content in ck editor.This ck editor get that border and etc.
When I assign value to the htmleditor at runtime in codebegind as below
Editor1.Content =
"<table border='0' ><tr><td><img src='../../images/ALSK/AlskCover.jpg'></td><td> </td><td><p><h2 style='color:red' align='center'><B>48 HOUR SALE!</B></h3></p><br><p>Subscribe today for spectacular full-color photography of wildlife and scenery from a
land beyond compare. You will receive features from award winning writers, articles about historical events that have shaped this great land, and expert guidance on hunting, fishing, traveling and surviving in the totally unique and unforgettable setting that
is Alaska.</p><p><font color='red'><u>Money Back Guarantee</u></font><br>If for any reason, at any time, you wish to cancel your subscription you may do so and receive a full refund for all unmailed issues.</p></td></tr></table>"
it
creates a border around the table and the content changes to automatically as below. I highlighted the code below it automatically assigns the below style. I did not do any chnages
<table
style="border-top-color: black; border-left-color: black; border-top-width: 1px; border-left-width: 1px; border-top-style: solid; border-left-style: solid;"><tbody><tr><td
style="border-right-color: black; border-bottom-color: black; border-right-width: 1px; border-bottom-width: 1px; border-right-style: solid; border-bottom-style: solid;"><img src="../../images/ALSK/AlskCover.jpg"></td><td
style="border-right-color: black; border-bottom-color: black; border-right-width: 1px; border-bottom-width: 1px; border-right-style: solid; border-bottom-style: solid;"> </td><td
style="border-right-color: black; border-bottom-color: black; border-right-width: 1px; border-bottom-width: 1px; border-right-style: solid; border-bottom-style: solid;"><h2 align="center"><b>48 HOUR SALE!</b></h2><br><br>Subscribe
today for spectacular full-color photography of wildlife and scenery from a land beyond compare. You will receive features from award winning writers, articles about historical events that have shaped this great land, and expert guidance on hunting, fishing,
traveling and surviving in the totally unique and unforgettable setting that is Alaska.<br><font color="red"><u>Money Back Guarantee</u></font><br>If for any reason, at any time, you wish to cancel your subscription you may do so and receive a full refund
for all unmailed issues.<br></td></tr></tbody></table>
SureshkumaaJ
0 Points
16 Posts
HTMLEDitor
Jan 23, 2013 09:48 PM|LINK
When I assign value to the htmleditor at runtime in codebegind as below
Editor1.Content =
"<table border='0' ><tr><td><img src='../../images/ALSK/AlskCover.jpg'></td><td> </td><td><p><h2 style='color:red' align='center'><B>48 HOUR SALE!</B></h3></p><br><p>Subscribe today for spectacular full-color photography of wildlife and scenery from a land beyond compare. You will receive features from award winning writers, articles about historical events that have shaped this great land, and expert guidance on hunting, fishing, traveling and surviving in the totally unique and unforgettable setting that is Alaska.</p><p><font color='red'><u>Money Back Guarantee</u></font><br>If for any reason, at any time, you wish to cancel your subscription you may do so and receive a full refund for all unmailed issues.</p></td></tr></table>"
it creates a border around the table and the content changes to
"<table style="border-top-color: black; border-left-color: black; border-top-width: 1px; border-left-width: 1px; border-top-style: solid; border-left-style: solid;"><tbody><tr><td style="border-right-color: black; border-bottom-color: black; border-right-width: 1px; border-bottom-width: 1px; border-right-style: solid; border-bottom-style: solid;"><img src="../../images/ALSK/AlskCover.jpg"></td><td style="border-right-color: black; border-bottom-color: black; border-right-width: 1px; border-bottom-width: 1px; border-right-style: solid; border-bottom-style: solid;"> </td><td style="border-right-color: black; border-bottom-color: black; border-right-width: 1px; border-bottom-width: 1px; border-right-style: solid; border-bottom-style: solid;"><h2 align="center"><b>48 HOUR SALE!</b></h2><br><br>Subscribe today for spectacular full-color photography of wildlife and scenery from a land beyond compare. You will receive features from award winning writers, articles about historical events that have shaped this great land, and expert guidance on hunting, fishing, traveling and surviving in the totally unique and unforgettable setting that is Alaska.<br><font color="red"><u>Money Back Guarantee</u></font><br>If for any reason, at any time, you wish to cancel your subscription you may do so and receive a full refund for all unmailed issues.<br></td></tr></tbody></table>"
asp.netforum...
Member
604 Points
132 Posts
Re: HTMLEDitor
Jan 23, 2013 10:02 PM|LINK
I think.i dont know any solutions. But its not all time past tag's.some time only threw the problem!!! but now we can remove this in postback time.But that is not good. So we can't do this. do u like just look this
http://stackoverflow.com/questions/6123569/how-to-get-rid-of-copy-paste-text-styling-in-ajax-html-editor
When any user align ck editor fonts and etc.So we not change any think.Its default issue.
Thanks...
Rion William...
All-Star
32078 Points
5221 Posts
Re: HTMLEDitor
Jan 23, 2013 10:04 PM|LINK
When storing or working with HTML, especially as strings, you are going to want to encode and decode it.
This can easily be done using the Server.HtmlEncode and Server.HtmlDecode methods.
So when you are first storing your content, for example into a string, you might want to do the following :
and likewise when you want to pull it out and actually display it on your page (or within your Editor), you can decode it as well :
Rion William...
All-Star
32078 Points
5221 Posts
Re: HTMLEDitor
Jan 23, 2013 10:11 PM|LINK
If your issue involves copy and pasting - you may have to attempt to capture that event and use Javascript to handle encoding or decoding the string that you are pasting.
SureshkumaaJ
0 Points
16 Posts
Re: HTMLEDitor
Jan 23, 2013 10:39 PM|LINK
I tried as susggested
Editor1.Content = Server.HtmlDecode(myHtmlEditorText);
But it adds border automatically the one I highlighted below. Why it adds a border automatically.
<table style="border-top-color: black; border-left-color: black; border-top-width: 1px; border-left-width: 1px; border-top-style: solid; border-left-style: solid;"><tbody><tr><td style="border-right-color: black; border-bottom-color: black; border-right-width: 1px; border-bottom-width: 1px; border-right-style: solid; border-bottom-style: solid;"><img src="../../images/ALSK/AlskCover.jpg"></td><td style="border-right-color: black; border-bottom-color: black; border-right-width: 1px; border-bottom-width: 1px; border-right-style: solid; border-bottom-style: solid;"> </td><td style="border-right-color: black; border-bottom-color: black; border-right-width: 1px; border-bottom-width: 1px; border-right-style: solid; border-bottom-style: solid;"><h2 align="center"><b>48 HOUR SALE!</b></h2><br><br>Subscribe today for spectacular full-color photography of wildlife and scenery from a land beyond compare. You will receive features from award winning writers, articles about historical events that have shaped this great land, and expert guidance on hunting, fishing, traveling and surviving in the totally unique and unforgettable setting that is Alaska.<br><font color="red"><u>Money Back Guarantee</u></font><br>If for any reason, at any time, you wish to cancel your subscription you may do so and receive a full refund for all unmailed issues.<br></td></tr></tbody></table>"
asp.netforum...
Member
604 Points
132 Posts
Re: HTMLEDitor
Jan 23, 2013 10:41 PM|LINK
You copy the content in any website.That website html design is set border.So u past the content in ck editor.This ck editor get that border and etc.
SureshkumaaJ
0 Points
16 Posts
Re: HTMLEDitor
Jan 23, 2013 10:47 PM|LINK
It adds the below line
style="border-top-color: black; border-left-color: black; border-top-width: 1px; border-left-width: 1px; border-top-style: solid; border-left-style: solid;"><tbody><tr><td style="border-right-color: black; border-bottom-color: black; border-right-width: 1px; border-bottom-width: 1px; border-right-style: solid; border-bottom-style: solid;"
SureshkumaaJ
0 Points
16 Posts
Re: HTMLEDitor
Jan 23, 2013 10:53 PM|LINK
Is there is a way to avoid the border being set
SureshkumaaJ
0 Points
16 Posts
Re: HTMLEDitor
Jan 23, 2013 11:00 PM|LINK
I will be more clear
<div class="comment-right-col">HTMLEDitor
1 hour, 8 minutes ago|LINK
<div>When I assign value to the htmleditor at runtime in codebegind as below
Editor1.Content =
"<table border='0' ><tr><td><img src='../../images/ALSK/AlskCover.jpg'></td><td> </td><td><p><h2 style='color:red' align='center'><B>48 HOUR SALE!</B></h3></p><br><p>Subscribe today for spectacular full-color photography of wildlife and scenery from a land beyond compare. You will receive features from award winning writers, articles about historical events that have shaped this great land, and expert guidance on hunting, fishing, traveling and surviving in the totally unique and unforgettable setting that is Alaska.</p><p><font color='red'><u>Money Back Guarantee</u></font><br>If for any reason, at any time, you wish to cancel your subscription you may do so and receive a full refund for all unmailed issues.</p></td></tr></table>"
it creates a border around the table and the content changes to automatically as below. I highlighted the code below it automatically assigns the below style. I did not do any chnages
<table style="border-top-color: black; border-left-color: black; border-top-width: 1px; border-left-width: 1px; border-top-style: solid; border-left-style: solid;"><tbody><tr><td style="border-right-color: black; border-bottom-color: black; border-right-width: 1px; border-bottom-width: 1px; border-right-style: solid; border-bottom-style: solid;"><img src="../../images/ALSK/AlskCover.jpg"></td><td style="border-right-color: black; border-bottom-color: black; border-right-width: 1px; border-bottom-width: 1px; border-right-style: solid; border-bottom-style: solid;"> </td><td style="border-right-color: black; border-bottom-color: black; border-right-width: 1px; border-bottom-width: 1px; border-right-style: solid; border-bottom-style: solid;"><h2 align="center"><b>48 HOUR SALE!</b></h2><br><br>Subscribe today for spectacular full-color photography of wildlife and scenery from a land beyond compare. You will receive features from award winning writers, articles about historical events that have shaped this great land, and expert guidance on hunting, fishing, traveling and surviving in the totally unique and unforgettable setting that is Alaska.<br><font color="red"><u>Money Back Guarantee</u></font><br>If for any reason, at any time, you wish to cancel your subscription you may do so and receive a full refund for all unmailed issues.<br></td></tr></tbody></table>
</div> </div>chetan.sarod...
All-Star
66619 Points
11270 Posts
Re: HTMLEDitor
Jan 24, 2013 02:37 AM|LINK
Refer this
http://forums.asp.net/t/1877407.aspx/1?HtmlEditor+Extender
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.