DXRichEditCopyPasteOptions.InsertOptions Property
Gets or sets options specifying how formatting is applied to the last paragraph of a numbered list inserted into a document. This is a dependency property.
Namespace: DevExpress.Xpf.RichEdit
Assembly: DevExpress.Xpf.RichEdit.v24.2.dll
NuGet Package: DevExpress.Wpf.RichEdit
Declaration
Property Value
Type | Description |
---|---|
InsertOptions | A InsertOptions object enumeration value specifying how formatting is applied to the formatted text inserted into a document. The default is InsertOptions.MatchDestinationFormatting |
Available values:
Name | Description |
---|---|
KeepSourceFormatting | Retains character styles and direct formatting (font size, emphasis, etc.) applied to the inserted text. |
MatchDestinationFormatting | Retains direct formatting (font size, emphasis, etc.) applied to the inserted text, but ignores all style properties. |
UseDestinationStyles | Retains styles associated with the target document when style definition conflicts occur. |
KeepTextOnly | Removes all formatting and non-text elements (pictures, shapes, comments, etc.). |
MergeFormatting | Changes the formatting so that it matches the text that surrounds the inserted content. |
Property Paths
You can access this nested property as listed below:
Object Type | Path to InsertOptions |
---|---|
RichEditControl |
|
Remarks
Set the InsertOptions option to InsertOptions.KeepSourceFormatting to retain the last item in the numbered list inserted using one of the following methods:
- SubDocument.InsertHtmlText
- SubDocument.AppendHtmlText
- SubDocument.InsertRtfText
- SubDocument.AppendRtfText
- SubDocument.InsertDocumentContent
Otherwise, the last item in the numbered list may lose formatting and be removed from the list, i.e., appear as a simple paragraph.
Important
The InsertOptions property value is ignored when inserting to the document header or footer.