6 Answers, 1 is accepted
The InlineUIContainers are exported as comments in XAML format. You can handle the InlineUIContainerExporting event of htmlFormatProvider.ExportSettings and process the Xaml in the comment to create the Html content you want to show in the place of the RadGridView (or any other UIElement you wish to have in RadRichTextBox). Additionally, in the next minor release, you'll be able to access the InlineUIContainer being serialized directly from the EventArgs.
The code you need to have in order to achieve that is:
private
void
exportButton_Click(
object
sender, RoutedEventArgs e)
{
HtmlFormatProvider provider =
new
HtmlFormatProvider();
provider.ExportSettings =
new
HtmlExportSettings();
provider.ExportSettings.InlineUIContainerExporting +=
new
System.EventHandler<InlineUIContainerExportingEventArgs>(ExportSettings_InlineUIContainerExporting);
string
result = provider.Export(
this
.radRichTextBox.Document);
}
void
ExportSettings_InlineUIContainerExporting(
object
sender, InlineUIContainerExportingEventArgs e)
{
string
xamlContent = e.CommentContent;
// implement your logic and set e.HtmlContent
}
If you have any other questions, do not hesitate to contact us again.
Kind regards,
Iva
the Telerik team


I believe we found the answer to why your HTML file was not imported in RadRichTextBox.
You can refer to this forum thread where you have posted your HTML.
Iva
the Telerik team

Do you mean that radrichtextbox already supports that import (those without px indicated)? I tried the online example but it says Unsupported File Format when I imported.
It sort of a hassle to decode the exported string from the RadGridView and put "px" on all the widths.. can you suggest another method so that i can view my exported grid?
What I meant was that we have adjusted the import in our development version and the exported grid view will be properly imported when we release an internal build or in the Q2 Beta (mid-June) at latest.
With the current version of the control, you must add the "px". You can do that by opening the HTML string with XDocument and modifying it before the import (as it is valid XHTML).
You can perform this type of modification for all properties that require it.
Iva
the Telerik team