If a document does not have definition for font size in all levels of the font hierarchy, then all runs that do not have font size set locally, will be imported with font size 9.5. In Microsoft Word, in this case, the font size value is 10. Workaround: Set the FontSize of the default document style after the document is imported: RadDocument reportDocument1; using (FileStream inputStream = new FileStream(@"C:\Original.docx", FileMode.Open)) { reportDocument1 = provider1.Import(inputStream); reportDocument1.StyleRepository[RadDocumentDefaultStyles.DefaultDocumentStyleName].SpanProperties.FontSize = Unit.PointToDip(10); } using (FileStream output = new FileStream(@"C:\test.docx", FileMode.OpenOrCreate)) { provider1.Export(reportDocument1, output); }
Inserting image inline from stream changes its size dramatically. Run the following code to reproduce: RadDocument document = new RadDocument(); RadDocumentEditor editor = new RadDocumentEditor(document); //editor.Insert("some text"); using (FileStream stream = File.OpenRead(@"C:\Temp\picture.jpg")) { editor.InsertImage(stream, ".png"); } File.WriteAllBytes($@"d:\Temp\test\test_doc.pdf", new PdfFormatProvider().Export(document)); The issue is observable after 2017.2.614.
When document with TOC field is exported to PDF, the hyperlinks in the TOC field are exported with blue fore color and blue underline (with the default hyperlink styling). Instead, they should be exported with the fore color visible in the document.
Workaround: Clear the hyperlink style from the spans inside the TOC:
var firstTocRange = this.radRichTextBox.Document.EnumerateChildrenOfType<FieldRangeStart>().Where(frs => frs.Field is TableOfContentsField).First();
this.radRichTextBox.Document.Selection.SelectAnnotationRange(firstTocRange);
foreach (var spanLayoutBox in this.radRichTextBox.Document.Selection.GetSelectedBoxes<SpanLayoutBox>())
{
spanLayoutBox.AssociatedSpan.Style = null;
}
Currently there are three places in the UI which contain a list of font sizes which could be applied to the content, and all of them could be customized separately: - RadRichTextBoxRibbonUI - could be customized by directly editing the content of the ribbon in the XAML file. - FontPropertiesDialog - could be customized by replacing the whole dialog (as SDK is available: https://github.com/telerik/xaml-sdk/tree/master/RichTextBox/CustomFontPropertiesDialog ), or a little hacky approach using the FindName method: ((ListBox)((Control)this.radRichTextBox.FontPropertiesDialog).FindName("fontSizeListBox")).ItemsSource = new List<double> { 10, 14, 16, 18, 20 }; - SelectionMiniToolBar - could be customized by changing the template of SelectionMiniToolBar Provide API which allows customization at a single place. This API could be similar to (or even extension of) the already available Telerik.Windows.Document.Layout.FontManager class.
Deleting table right after merged fields are updated causes StackOverflowException.
The TxtFormatProvider always imports the document with UTF8 encoding. It will be great if users could change this setting in order to import document with different encodings.
When there is a hyperlink enclosed in another annotation (e.g comment, bookmark, read-only range), and the user moves the caret position just before or just after the hyperlink, and starts typing there, the text is inserted with the style of the hyperlink (by default, blue with blue underline). Instead, the text should be inserted without such style.
When a hyperlink (and only the hyperlink) is selected, and the user types over the selection, the hyperlink is deleted, and text with locally set blue fore color and blue underline is inserted. Instead, the hyperlink should be preserved, and just its link text should be modified.
Implement an option for the customers to split a document into two views, allowing them to edit and view different parts of the document at the same time.
Allow the customers to change the properties defined in the default stylesheet. They need to change properties like font size, font family, border-spacing, line-spacing, as in RadRichTextBox they might be different from the ones used by the browsers.
The Outline view shows the content of a document as bulleted points. It enables the user to easily move whole paragraphs within the document or to create headings.
When selection is applied quick after format painter is clicked formatting is not applied.
When copying the formatting using span to span selection, any formatting applied with a character style is lost.
When RadRichTextBox for WPF is hosted in a WinForms application (through ElementHost), typing with Japanese IME duplicates the typed letters, which makes the control unusable with the default behavior. Possible workaround: Create custom caret. There are some suggestions in this forum thread: https://www.telerik.com/forums/richtextbox-doesn't-support-japanese-ime-when-hosted-in-winforms
<samp> HTML element could be imported as span with specific formatting. Currently it's just ommited.
When a span element's opening and closing tags are on different lines in the HTML and there is no content in the span, it should be imported as a single space. For example, the following HTML: test,<span> </span>test<span> should be imported as test, test Note: If there is content in the span that is split between the lines, it is correctly imported: test,<span>a </span>test<span> results in test,a test
Currently unknown/unsupported elements are skipped, which potentially loses text content. Consider adding setting in HtmlImportOptions allowing the phrasing content (text) of these elements to be imported. Sample HTML: <html> <body> <test-test>test-test</test-test> <body/> </html> Browsers visualize it as "test-test", while RadRichTextBox doesn't import anything. MS Word imports such elements as inline elements (just like spans).
When content has a font-size applied in EM values and the UseDefaultStylesheetFontProperties property of HtmlFormatProvider is set to true, the imported content has pretty small values for font size.
When inserting a new row using the InsertTableRowBelow below, the expected behavior would be to copy the paragraph styles of the paragraphs in the cells in the existing row. This works when there is a property set locally, e.g. the text is bold, but the paragraph style, e.g. Heading 1 is lost.
When inserting a new row using the InsertTableRowBelow below, the expected behavior would be to copy the paragraph styles of the paragraphs in the cells in the existing row. However, the style of the newly created paragraph is initially set to null and at some later point it is set to Normal. This creates an issue when using an HtmlDataProvider, which does not become aware of the change and the source HTML does not become updated with the information that the paragraph has style null. Workaround: set all paragraphs with style null to have Normal style: foreach (var paragraph in RichTextBox.Document.EnumerateChildrenOfType<Paragraph>()) { if (paragraph.Style == null) { paragraph.StyleName = "Normal"; } }