The default indentation of the list bullets is different when shown in the RadRichTextBox and when exported to HTML and shown in a web browser. There is a screenshot attached showing how the result is rendered in a web browser.
If content with DocumentLists and ListStyles respectively, is copied from Microsoft Word and then pasted in RadRichTextBox, ArgumentNullException is thrown while the lists from the DocumentFragment are fixed (FixListStyles() method). The exception is caught and thus, the content from the clipboard is not inserted during the copy/paste operation. In some cases, when the content is pasted again, the content is pasted. Workaround: Replace the fragment in the clipboard with one that is already "fixed". See the attached MainWindow.cs.txt
Bullets of a list are exported with a character which is not proper for plain text. The indentation of the bullet is also not exported. As a workaround, the incorrect bullet character could be replaced with something more suitable. Here is an example: TxtFormatProvider textFormatProvider = new TxtFormatProvider(); exportedText = textFormatProvider.Export(this.radRichTextBox.Document); string newText = exportedText.Replace((char)61623, (char)8226);
Tab stops with visible tab leader (dot, hyphen, underscore) are not exported to PDF. Steps to reproduce: - Start with empty document - In Paragraph Properties dialog, choose Tabs - In Tab dialog, enter Tab stop position = 2, Leader = underscore, and press Set. Press OK - Add a word, press Tab, add another word - Export the text to PDF Expected: the words are separated with underscores in the exported PDF. Actual: the words are separated with blank space in the exported PDF.
Importing a document with block-level content controls from XAML causes them to become corrupt. If you scroll to a position in which the said control is only partially visible a NullReferenceException is thrown.
A possible workaround would be to initially save the document as a DOCX (just exporting it to DOCX will not fix the issue as the information is already corrupt).
Another way to reproduce this issue:
1. Create a new document and insert a Rich Text Content Control.
2. Save the document as a XAML file.
3. Reopen the XAML file.
4. Move the caret inside the Content Control.
5. Try to insert a new line by hitting Enter - no new line is added as the content control is marked as Inline Level after the import in step 3.
Case 2:
Create a document with TOC where the content control of the TOC contains some other inlines.
Inserting carriage returns in table cell until floating UI container is moved to another page causes a crash.
When cells with borders are copied from Microsoft Excel and pasted in RadRichTextBox, some of the borders are missing depending on their type - for example double borders, but also some other types.
When track changes are enabled, setting very large values for both the Top and Bottom values of Distance from text, causes an exception in ParagraphLayoutBox. Stack trace: {System.NullReferenceException: Object reference not set to an instance of an object. at Telerik.Windows.Documents.Layout.ParagraphLayoutBox.ArrangeOverride(SizeF finalSize) at Telerik.Windows.Documents.Layout.LayoutElement.ArrangeCore(RectangleF finalRect) at Telerik.Windows.Documents.Layout.LayoutElement.Arrange(RectangleF finalRect) at Telerik.Windows.Documents.Layout.SectionLayoutBox.ArrangeOverride(SizeF finalSize) at Telerik.Windows.Documents.Layout.LayoutElement.ArrangeCore(RectangleF finalRect) at Telerik.Windows.Documents.Layout.LayoutElement.Arrange(RectangleF finalRect) at Telerik.Windows.Documents.Layout.DocumentLayoutBox.ArrangeOverride(SizeF finalSize) at Telerik.Windows.Documents.Layout.LayoutElement.ArrangeCore(RectangleF finalRect) at Telerik.Windows.Documents.Layout.LayoutElement.Arrange(RectangleF finalRect) at Telerik.Windows.Documents.Model.RadDocument.Arrange(RectangleF arrangeRect) at Telerik.Windows.Documents.UI.DocumentPrintLayoutPresenter.MeasureOverride(Size availableSize) at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)} Steps to reproduce: 1. Enable track changes 2. Insert an image 3. Open Floating Blocks Layout Dialog 4. Choose Top and Bottom 5. Set "Distance from text" for both Top and Bottom to 2000px and click OK Result: Exception is thrown Additional info: Problem is also reproduced with very large images (1000 x 800 px) and small values for Distance from text.
Pasting HTML content causes RichTextBox to insert a paragraph break, even if the copied content did not include the end of the paragraph. Steps to reproduce: 1. Copy the first few words in a paragraph from Internet Explorer 2. Paste into the middle of a sentence in the RichTextBox Expected: The content is pasted inline Observed: The content is inserted, but a paragraph break is inserted after the content
The state of the button shows that the current paragraph is still in a list. The button state is updated after moving the caret using the mouse. Steps to reproduce: 1. Create a list 2. Enter some text in the first item 3. Hit enter twice Observed: The current paragraph is no longer part of a list but the list button remains active in the ribbon
If you highlight a section of text and apply styles to it like bold/italic/underline and place your cursor at the end of that text the Clear All Formatting button does not work. If you turn on those styles and then type some text and place your cursor at the end of that text it does work. The difference in the XAML is that in the first case the styles are only on the span of text itself while in the second the styles are on the span and the paragraph. I have attached a GIF of steps to reproduce and the XAML from the editor before clicking the Clear All Formatting button.
Use the attached project to reproduce.
- Click the "Go To endPosition" button. The Caret remains on the same line.
The table preferred width value set to Auto or in percents is ignored and is always exported with fixed value. Steps to reproduce: Create a table with two columns in RadRichTextBox. Set the table preferred width to auto. Set the table cell preferred width for both columns to 50%. Export to Docx format. Observed result: the table has preferred width as fixed value 6.62 inches. The columns have the correct width. Expected result: the table preferred width to be auto.
private void radRichTextBox_CommandExecuted(object sender, CommandExecutedEventArgs e)
{
if (e.Command is DeleteCommand && imageToDelete!=null)
{
this.radRichTextBox.Document.Selection.Clear();
this.radRichTextBox.Document.Selection.AddDocumentElementToSelection(imageToDelete);
this.radRichTextBox.Delete(true);
this.imageToDelete = null;
}
}
private ImageInline imageToDelete;
void radRichTextBox_CommandExecuting(object sender, Telerik.Windows.Documents.RichTextBoxCommands.CommandExecutingEventArgs e)
{
if (e.Command is DeleteCommand)
{
var selectedBoxes = this.radRichTextBox.Document.Selection.GetSelectedBoxes().ToList();
if (selectedBoxes.Count() == 2 && selectedBoxes[0].AssociatedInline is FieldRangeStart && selectedBoxes[1].AssociatedInline is ImageInline)
{
imageToDelete = selectedBoxes[1].AssociatedInline as ImageInline;
}
}
}
When the content after the current caret position consists only of whitespaces, double-pressing the enter key should break out of the list because spaces after the caret should not be considered content in the current list item. Steps to reproduce: 1. Create a list 2. Type some text in the first line with a space after it 3. Move the cursor to the left before the space 4. Press enter twice The current paragraph is still in a list.
When HTML attribute is set and the same property is set in CSS, the element should be styled according to the CSS values, because they have higher priority. For example: <table border="5" style="border: 1px solid black">