Unplanned
Last Updated: 19 Jul 2018 07:23 by ADMIN
ADMIN
Anna
Created on: 10 Jul 2018 08:17
Category: RichTextBox
Type: Bug Report
0
RichTextBox: InsertTableRowBelow and InsertTableRowAbove methods set the style of the paragraphs in the new cells to null
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";
                    }
                }
0 comments