This question is locked. New answers and comments are not allowed.
Hi Everyone
I'm using the RadRichTextBox for displaying email messages. And now I have an issue with it - if message contains html with dl, dt and dd tags - all data between these tags is lost.
Here is the example of XAML:
And here is the C#:
So, maybe you can suggest the solution of this issue or another control for my needs?
Best regards,
Dzmitry
I'm using the RadRichTextBox for displaying email messages. And now I have an issue with it - if message contains html with dl, dt and dd tags - all data between these tags is lost.
Here is the example of XAML:
01.<Grid x:Name="LayoutRoot" Background="White">02. <Grid.RowDefinitions>03. <RowDefinition Height="Auto"></RowDefinition>04. <RowDefinition Height="*"></RowDefinition>05. </Grid.RowDefinitions>06. <Grid.ColumnDefinitions>07. <ColumnDefinition></ColumnDefinition>08. <ColumnDefinition></ColumnDefinition>09. </Grid.ColumnDefinitions>10. <Button Grid.Row="0" Grid.Column="0" Click="SetValidData">Set Valid Html Data</Button>11. <Button Grid.Row="0" Grid.Column="1" Click="SetBrokenData">Set Broken Html Data</Button>12. <telerik:RadRichTextBox x:Name="emailContentTextBox" Grid.Row="1" Grid.ColumnSpan="2" AcceptsTab="True">13. </telerik:RadRichTextBox>14. </Grid>And here is the C#:
01.public partial class MainPage02.{03. public MainPage()04. {05. InitializeComponent();06. }07. 08. public string HtmlDataBroken09. {10. get11. {12. return "<!DOCTYPE html><html><body><ul><li>One</li><li>Two</li></ul><dl><dt>Coffee</dt><dd>Black hot drink</dd><dt>Milk</dt><dd>White cold drink</dd></dl><ul><li>Three</li><li>Four</li></ul></body></html>";13. }14. }15. 16. public string HtmlDataValid17. {18. get19. {20. return "<!DOCTYPE html><html><body><ul><li>One</li><li>Two</li></ul><table><tr>Coffee</tr><tr>Black hot drink</tr><tr>Milk</tr><tr>White cold drink</tr></table><ul><li>Three</li><li>Four</li></ul></body></html>";21. }22. }23. 24. private void SetBrokenData(object sender, System.Windows.RoutedEventArgs e)25. {26. emailContentTextBox.Document = new HtmlFormatProvider().Import(this.HtmlDataBroken);27. }28. 29. private void SetValidData(object sender, System.Windows.RoutedEventArgs e)30. {31. emailContentTextBox.Document = new HtmlFormatProvider().Import(this.HtmlDataValid);32. }33.}So, maybe you can suggest the solution of this issue or another control for my needs?
Best regards,
Dzmitry