Html exported from RadRichTextBox will be shown in Outlook with some formatting issues related to lists. The text in a paragraph will be shown with the formatting of its bullet. The reason is that the content is exported to HTML as a styled list level which Outlook does not understand. The same applies to MS Word as well. This can also lead to formatting issues when the document is later imported in RichTextBox. You can check the attached screenshot for reference. Workaround: Change the styles to export as inline properties: htmlProvider.ExportSettings.StylesExportMode = StylesExportMode.Inline;
When a text doesn't specify font explicitly with \fN tag, and default character properties (\defchp) are not specified, or are specified but without font set, the font of the text is visualized with the default font - Verdana. Instead, the default font for the document should be used - defined with \deffN tag.
The exception is thrown by the SystemFontsManager internal class from Telerik.Windows.Documents.Core, so it can observed when using RadPdfViewer, RadRichTextBox, RadSpreadsheet. The reason is not clear, posssible causes are: - Corrupted fonts after upgrade from Windows XP - Enabling of Block untrusted fonts feature (https://docs.microsoft.com/en-us/windows/threat-protection/block-untrusted-fonts-in-enterprise ) The call stack is as follows: System.TypeInitializationException: The type initializer for 'Telerik.Windows.Documents.Core.Fonts.SystemFontsManager' threw an exception. ---> System.IO.FileNotFoundException: Unable to find the specified file. at MS.Internal.Text.TextInterface.Native.Util.ConvertHresultToException(Int32 hr) at MS.Internal.Text.TextInterface.FontList.get_Item(UInt32 A_0) at MS.Internal.Text.TextInterface.FontList.FontsEnumerator.get_Current() at MS.Internal.FontFace.TypefaceCollection.Enumerator.get_Current() at System.Windows.Media.Fonts.TypefaceCollection.<GetEnumerator>d__11.MoveNext() at Telerik.Windows.Documents.Core.Fonts.SystemFontsManager..cctor() Workaround: Manually delete all registry key values in Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts pointing to files outside of the Fonts folder.
In some cases when an image is copied from an external source and pasted in the rich text box, the image is not displayed. This is caused by the Clipboard.GetImage() method used internally by the control. To work this around, you can subscribe for the CommandExecuting event of RadRichTextBox and manually get the image from the clipboard. private void Rtb_CommandExecuting(object sender, Telerik.Windows.Documents.RichTextBoxCommands.CommandExecutingEventArgs e) { PasteCommand command = e.Command as PasteCommand; if (command != null && (Clipboard.GetData("DeviceIndependentBitmap") != null)) { //Get the image stream from the clipboard. //You can check the following blog post for an approach which you can use to get the image properly: //https://www.thomaslevesque.com/2009/02/05/wpf-paste-an-image-from-the-clipboard/ this.radRichTextBox.InsertImage(imageStream, "jpeg"); e.Cancel = true; } }
Using Microsoft Pinyin IME for typing in the RichTextBox causes FatalExecutionEngineError exception.
Actually, when we go to image editor from the RadRichTextBox, we've got the original image's size but not the width and height in the document. When we need to format pictures of a document with equal size, we are using the document's size, not the picture's size. Thanks
With a picture of original size like this : width 2 800 and Height 1376. On the screen the picture is around 470 by 230. If I go to the Image Editor, it shows me the picture size itself but not the area size used by the picture. It is a good thing to have the original picture's dimension but we work with the dimension used in the document. So, could you do something to resize the picture used in the document.
In my samples, you'll see my picture in a document (ie1), what I see when I go in the Image Editor (ie2) and, when I go to the Resize section (ie3). Suggestion, put the original image's dimension on the top of the right corner in the resize section. The width and Height should show the dimension in the document.
Thanks a lot,
If I setup the richtextbox content through the UI as shown in P1.png and try to restore it by pasting the generated html, I get instead P2.png. Expected to be the same.
I attached the sample project. We're using the recommended settings to use the same html in telerik reports, but can't find the reference on your site, it used on the on this link http://docs.telerik.com/devtools/wpf/controls/radrichtextbox/import-export/features-import-export-settings#htmlformatprovider
The same issue is observed with heading styles.
The HtmlExportSettings property PropertiesToIgnore can't be used to control how the paragraph or character properties of a list will be exported. Steps to reproduce: Create a document with a list of different levels. Set fp.ExportSettings.PropertiesToIgnore["li"].Add("margin-left"); Export to HTML. Observed: The PropertiesToIgnore doesn't work for paragraph properties of a list.
Finding text with regex for the last paragraph is not possible. This is caused by the fact that the search treats the last paragraph symbol as the last paragraph.
htmlProvider.ExportSettings.StylesExportMode = StylesExportMode.Classes;
Nested ol/ul list should be inside a <li> element of the list in which it is nested. For example:
<ul>
htmlProvider.ExportSettings.StylesExportMode = StylesExportMode.Inline;