Last Updated: 20 Nov 2017 12:09 by ADMIN
Created on: 10 Nov 2017 14:57
Category: RichTextEditor
Type: Bug Report
FIX. RadRichTextEditor - creating document from selection doesn't copy styles when used as a Next style
1. Create a document containing a style with NextStyleName:

           StyleDefinition myStyle = new StyleDefinition();
            myStyle.Type = StyleType.Table;
            myStyle.DisplayName = "My Style";
            myStyle.Name = "myStyle";
            myStyle.NextStyleName = RadDocumentDefaultStyles.HyperlinkStyleName;


2. Add several paragraphs and select some of them (ensure there is one using our custom style).

3. Create a DocumentFragment using the selection's CopySelectedDocumentElements

4. Convert the fragment to RadDocument and try to export it

Observed: When exporting to DOCX and XAML, the style is missing. Exporting to RTF causes KeyNotFoundException.

Expected: The style should be preserved in the exported document

Workaround: After creating the document from the fragment, ensure all needed styles are copied and available.

(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)