<asp:TextBox Width="100%" ID="someText" runat="server" TextMode="MultiLine" Rows="25" Columns="100" Text=""></asp:TextBox>
<ajaxToolkit:HtmlEditorExtender
ID="someTextExtender"
TargetControlID="someText"
DisplaySourceTab="false"
runat="server">
<Toolbar>
<ajaxToolkit:Undo />
<ajaxToolkit:Redo />
<ajaxToolkit:Bold />
<ajaxToolkit:Italic />
<ajaxToolkit:Underline />
<ajaxToolkit:StrikeThrough />
<ajaxToolkit:Subscript />
<ajaxToolkit:Superscript />
<ajaxToolkit:JustifyLeft />
<ajaxToolkit:JustifyCenter />
<ajaxToolkit:JustifyRight />
<ajaxToolkit:JustifyFull />
<ajaxToolkit:InsertOrderedList />
<ajaxToolkit:InsertUnorderedList />
<ajaxToolkit:CreateLink />
<ajaxToolkit:UnLink />
<ajaxToolkit:RemoveFormat />
<ajaxToolkit:SelectAll />
<ajaxToolkit:UnSelect />
<ajaxToolkit:Delete />
<ajaxToolkit:Cut />
<ajaxToolkit:Copy />
<ajaxToolkit:Paste />
<ajaxToolkit:BackgroundColorSelector />
<ajaxToolkit:ForeColorSelector />
<ajaxToolkit:FontNameSelector />
<ajaxToolkit:FontSizeSelector />
<ajaxToolkit:Indent />
<ajaxToolkit:Outdent />
<ajaxToolkit:InsertHorizontalRule />
<ajaxToolkit:HorizontalSeparator />
<ajaxToolkit:InsertImage />
</Toolbar>
</ajaxToolkit:HtmlEditorExtender>
htmlText = "<div><p style="margin-left:.5in"><b>Text</b> </p>
<p style="margin-left:.5in"><b>bold</b> Text<p>
<p style="margin-left:.8in"><b>Name:</b> FirstName + LastName</p>
<p style="margin-left:.8in"><b>Email:</b> Email</p></div>"
HtmlDocument doc = new HtmlDocument();
doc.LoadHtml(htmlText);
HtmlNode bodyNode = doc.DocumentNode.SelectSingleNode("//body");
someText.Text = HttpUtility.HtmlDecode(bodyNode.InnerHtml);
margin-left:.5in is used for indenting purposes which is NOT working when I use the above code. I tried to use Indent and Outdent buttons on the HtmlEditorExtender control, they are NOT greyed out but when clicked NOTHING happens.
Any help greatly appreciated.
Comments: When EnableSanitization enabled (="true") and then <p style="margin-left:.5in"> is replaced with <blockquote style="margin-left:.5in"> Indenting works fine.
<ajaxToolkit:HtmlEditorExtender
ID="someTextExtender"
TargetControlID="someText"
DisplaySourceTab="false"
runat="server">
<Toolbar>
<ajaxToolkit:Undo />
<ajaxToolkit:Redo />
<ajaxToolkit:Bold />
<ajaxToolkit:Italic />
<ajaxToolkit:Underline />
<ajaxToolkit:StrikeThrough />
<ajaxToolkit:Subscript />
<ajaxToolkit:Superscript />
<ajaxToolkit:JustifyLeft />
<ajaxToolkit:JustifyCenter />
<ajaxToolkit:JustifyRight />
<ajaxToolkit:JustifyFull />
<ajaxToolkit:InsertOrderedList />
<ajaxToolkit:InsertUnorderedList />
<ajaxToolkit:CreateLink />
<ajaxToolkit:UnLink />
<ajaxToolkit:RemoveFormat />
<ajaxToolkit:SelectAll />
<ajaxToolkit:UnSelect />
<ajaxToolkit:Delete />
<ajaxToolkit:Cut />
<ajaxToolkit:Copy />
<ajaxToolkit:Paste />
<ajaxToolkit:BackgroundColorSelector />
<ajaxToolkit:ForeColorSelector />
<ajaxToolkit:FontNameSelector />
<ajaxToolkit:FontSizeSelector />
<ajaxToolkit:Indent />
<ajaxToolkit:Outdent />
<ajaxToolkit:InsertHorizontalRule />
<ajaxToolkit:HorizontalSeparator />
<ajaxToolkit:InsertImage />
</Toolbar>
</ajaxToolkit:HtmlEditorExtender>
htmlText = "<div><p style="margin-left:.5in"><b>Text</b> </p>
<p style="margin-left:.5in"><b>bold</b> Text<p>
<p style="margin-left:.8in"><b>Name:</b> FirstName + LastName</p>
<p style="margin-left:.8in"><b>Email:</b> Email</p></div>"
HtmlDocument doc = new HtmlDocument();
doc.LoadHtml(htmlText);
HtmlNode bodyNode = doc.DocumentNode.SelectSingleNode("//body");
someText.Text = HttpUtility.HtmlDecode(bodyNode.InnerHtml);
margin-left:.5in is used for indenting purposes which is NOT working when I use the above code. I tried to use Indent and Outdent buttons on the HtmlEditorExtender control, they are NOT greyed out but when clicked NOTHING happens.
Any help greatly appreciated.
Comments: When EnableSanitization enabled (="true") and then <p style="margin-left:.5in"> is replaced with <blockquote style="margin-left:.5in"> Indenting works fine.