Skip to main content

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.v24.1.Core.dll

NuGet Packages: DevExpress.RichEdit.Core, DevExpress.Win.Navigation

Declaration

[ComVisible(true)]
public enum InsertOptions

Members

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.

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:

The table below shows how formatting is applied to the pasted document elements depending on the InsertOptions value:

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

KeepSourceFormatting

The inserted text retains its formatting.

New styles (styles that don’t exist in the target document) are copied. If character or paragraph style conflicts occur, all inserted style properties are applied as direct formatting, but the style itself is not transferred. Destination document styles with default settings are replaced with the inserted styles. Conflicting table and numbering list styles are copied to the document — the new style name is a combination of conflicting style names (for example, Normal1 and Normal1 are combined into Normal11).

Non-textual elements are retained.

All page properties are retained.

KeepTextOnly

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.

MatchDestinationFormatting

The inserted text retains its formatting.

All inserted styles are not retained.

Non-textual elements are retained.

All page properties are retained.

MergeFormatting

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.

UseDestinationStyles

The inserted text keeps its format options.

New styles (styles that don’t exist in the target document) are copied. If style conflicts occur, the inserted content’s styles are ignored. The destination document’s styles with default settings are replaced with the inserted styles.

Non-textual elements are retained.

All page properties are retained.

See Also