InsertOptions Enum
Lists options specifying how formatting is applied to the formatted text inserted into a document.
Namespace: DevExpress.XtraRichEdit.API.Native
Assembly: DevExpress.RichEdit.v18.2.Core.dll
Declaration
Members
Name | Description |
---|---|
KeepSourceFormatting
|
Retains character styles and direct formatting (font size, emphasis, etc.) applied to the inserted text. |
MatchDestinationFormatting
|
Default value. |
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. |
Related API Members
The following properties accept/return InsertOptions values:
Library | Related API Members |
---|---|
WPF Controls | DXRichEditCopyPasteOptions.InsertOptions |
DXRichEditCopyPasteOptions.TabInsertOptions | |
Office File API | CopyPasteOptions.InsertOptions |
CopyPasteOptions.TabInsertOptions |
Remarks
The CopyPasteOptions.InsertOptions property returns the InsertOptions enumeration value.
Use the InsertOptions value as an insertOptions parameter for the following methods:
- SubDocument.InsertDocumentContent
- SubDocument.AppendDocumentContent
- SubDocument.AppendHtmlText
- SubDocument.InsertHtmlText
- SubDocument.AppendRtfText
- SubDocument.InsertRtfText
The table below shows how formatting is applied to the pasted document elements depending on the InsertOptions property value:
Enumeration Value | Direct Formatting | Styles (character, paragraph, table) | Non-textual objects (tables, floating objects, comments, etc.) | Page Properties and Tabs |
---|---|---|---|---|
The inserted text retains its formatting. | New styles (styles that don’t exist in the target document) are copied. If character or paragraph style conflict occurs, all inserted style’s properties are applied as direct formatting, but the style itself is not transferred. Destination document’s styles with default settings are substituted with inserted styles. Conflicted table and numbering list styles are copied to the document. The style name is a combination of conflicted styles’ names (e.g., Normal1 and Normal1 are combined into_Normal11_). | Non-textual elements are retained. | All page properties are retained. | |
The inserted text loses its formatting and takes on direct formatting applied to the target text range. Numbering lists are converted to simple text. | All inserted styles are not retained. | Floating objects, shapes and comments are discarded. Tables are converted into a series of paragraphs. | All page properties, including tabs, are lost. | |
The inserted text retains the following character properties:
Other character properties and all paragraph properties are ignored. | Inserted style’s character properties are applied as direct, but the style itself is not copied to the target document. Style paragraph properties are ignored. Table styles are not retained. Numbering list styles are transferred to the target document. | Non-textual elements are retained. | Page properties are retained. Tabs are ignored. | |
The inserted text keeps its format options. | New styles (styles that don’t exist in the target document) are copied. If style conflict occurs, the inserted content’s styles are ignored. Destination document’s styles with default settings are substituted with inserted styles. | Non-textual elements are retained. | All page properties are retained. |