The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

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

Declaration

[ComVisible(true)]
public enum InsertOptions
<ComVisible(True)>
Public Enum InsertOptions
[ComVisible(true)]
public enum InsertOptions
<ComVisible(True)>
Public Enum InsertOptions

Members

Name Description
KeepSourceFormatting

Retains character styles and direct formatting (font size, emphasis, etc.) applied to the inserted text.

KeepTextOnly

Removes all formatting and non-text elements (pictures, shapes, comments, etc.).

MatchDestinationFormatting

Default value.

MergeFormatting

Changes the formatting so that it matches the text that surrounds the inserted content.

UseDestinationStyles

Retains styles associated with the target document when style definition conflicts occur.

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 property value:

Enumeration Value

Direct Formatting

Styles (character, paragraph, table)

Non-textual objects (tables, floating objects, comments, etc.)

Page Properties and Tabs

InsertOptions.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 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.

InsertOptions.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.

InsertOptions.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.

InsertOptions.UseDestinationStyles

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.

See Also