Add a way to convert between RadRichTextBox's RadDocument and RadWordsProcessing's RadFlowDocument. This will enable integration scenarios between the two products, including using RadWordsProcessing's format providers for import and export.
Hi all,
Are there scenarios in which the import and export capabilities don't fit your requirements? We are currently thinking that using the format provider classes of the two components would be a good enough solution for the conversion and would like to check whether there is something additional you might need. Any input on the specific needs will be appreciated.
Regards,
Tanya
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Hello Joshua,
The DocFormatProvider is part of the DocumentProcessing library which is a separate library that is not connected to the RadRichTextBox. Currently, the possible solution is to use the DocumentProcessing library to convert the document to DOCX and then open it in RadRichTextBox.
Another approach is demonstrated here as well: xaml-sdk/RichTextBox/DocFormatProviderDemo at master · telerik/xaml-sdk
Regards,
Dimitar
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Hi Hilton,
Yes, this is still not implemented, it has a lot of votes, I am sure that it will be implemented in one of the future releases.
I can suggest a workaround that uses the docx format for the conversion for now:
private void RadButton_Click(object sender, RoutedEventArgs e)
{
var rtbProvider = new Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.DocxFormatProvider();
var wordsProcessingProvider = new Telerik.Windows.Documents.Flow.FormatProviders.Docx.DocxFormatProvider();
var radDocument = radRichTextBox.Document;
var docBytes = rtbProvider.Export(radDocument);
var flowDocument = wordsProcessingProvider.Import(docBytes);
}
Should you have any other questions do not hesitate to ask.
Regards,
Dimitar
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Hi Peter, You can implement this scenario using the HtmlFormatProvider of RadRichTextBox. In order to use this provider, you need to add a reference to the Telerik.Windows.Documents.FormatProviders.Html assembly and a using directive for the Telerik.Windows.Documents.FormatProviders.Html namespace. You might find helpful to check the Import/ Export article of RadRichTextBox for more information about the functionality: http://docs.telerik.com/devtools/wpf/controls/radrichtextbox/import-export/features-import-export Regards, Tanya
I really want from RadFlowDocument to RadDocument so i can set my RadRichTextBox.Document = htmlFormatProvider.Import("my html text); Is there another way to do this for now?
Please add this feature to WinForms too. Thanks,