This is a migrated thread and some comments may be shown as answers.

HTML not rendred inside RichtextBox

2 Answers 82 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Tanuj
Top achievements
Rank 1
Tanuj asked on 01 Nov 2011, 04:57 AM
(Attached screen shopt of HTML and property which is binded to richtextbox also in the project i have stripped down all "\n" to have vanila HTML)

Hi we have got 2 applications on single database, and both of them saves HTML in db now in one application we are using RadRichTextBox now when below HTML is assigned to HTMLDataProvider its is not rendred to the UI

Now do you see anything wwrong in this which might be causing pain to RadRichTextbox


\n<STYLE type=text/css>\n.p_CC664AAA { margin: 0px 0px 12px 0px;text-align: left;text-indent: 0pt;padding: 0px 0px 0px 0px; } \n.s_1681A555 { font-family: 'Times New Roman';font-style: Normal;font-weight: normal;font-size: 16px;color: #000000; } \n.s_E6FD2046 { font-family: 'Verdana';font-style: Normal;font-weight: normal;font-size: 16px;color: #000000; } \n</STYLE>\n\n<P class=p_CC664AAA><SPAN class=s_1681A555>LOng text</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN cl
ass=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1
</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1</SPAN><SPAN class=s_E6FD2046><BR></SPAN><SPAN class=s_1681A555>1992<BR>2<BR>2<BR>2<BR>2<BR>2<BR>33</SPAN></P>

And my RadRichTextBox setting are (they are under root grid)
<telerik1:RadRichTextBox Grid.Row="8" Grid.Column="1" Grid.ColumnSpan="3" TabIndex="2"
                                                 IsContextMenuEnabled="True" IsSelectionMiniToolBarEnabled="True" IsSpellCheckingEnabled="True"
                                                 LayoutMode="Flow"  Margin="0" Name="txtdetails" MinHeight="15" BorderThickness="0"
                                                 VerticalAlignment="Stretch" DocumentInheritsDefaultStyleSettings="False"
                                                 Padding="0" MouseOverBorderThickness="0" />
                        <RadHTMLDataProvider:HtmlDataProvider x:Name="HTMLDataProvider" RichTextBox="{Binding ElementName=txtPublicSummary}" Html="{Binding Details Mode=TwoWay,ValidatesOnDataErrors=True,NotifyOnValidationError=True}"
                            SetupDocument="HTMLDataProvider_SetupDocument"></RadHTMLDataProvider:HtmlDataProvider>

2 Answers, 1 is accepted

Sort by
0
Tanuj
Top achievements
Rank 1
answered on 04 Nov 2011, 09:49 AM
RadRichTextBox is XHtml Compliant
So we need to convert / keep all Html tags in lower case.

Figured out it myself,
0
Tim
Top achievements
Rank 1
answered on 18 Nov 2011, 05:02 PM
Hi Tanuj,

Do you have a clean way that you converted all your tags to lower case?  I was going to look at RegEx or possible looking at creating an HtmlDocument but I thought I would ask before I start.

-Tim
Tags
RichTextBox
Asked by
Tanuj
Top achievements
Rank 1
Answers by
Tanuj
Top achievements
Rank 1
Tim
Top achievements
Rank 1
Share this question
or