ASPxHtmlEditorHtmlEditingSettings.PasteMode Property
Gets or sets a value that specifies how the ASPxHtmlEditor formats the pasted HTML content.
Namespace: DevExpress.Web.ASPxHtmlEditor
Assembly: DevExpress.Web.ASPxHtmlEditor.v24.1.dll
NuGet Package: DevExpress.Web
Declaration
[DefaultValue(HtmlEditorPasteMode.SourceFormatting)]
public HtmlEditorPasteMode PasteMode { get; set; }
Property Value
Type | Default | Description |
---|---|---|
HtmlEditorPasteMode | SourceFormatting | One of the HtmlEditorPasteMode enumeration values. |
Available values:
Name | Description |
---|---|
SourceFormatting | The formatting of the pasted content is retained. A style definition that is associated with the copied text is copied to the destination document. |
MergeFormatting | The formatting of the pasted content is mostly discarded. However, emphasis formatting, such as bold and italic text, is retained. The content takes on the style characteristics of the paragraph where it is pasted. The content also takes on any direct formatting or style properties of element that immediately precedes the cursor when the content is pasted. |
PlainText | The formatting of the pasted content and non-text elements, such as pictures or tables, is discarded. The text takes on the style characteristics of the paragraph where it is pasted and takes on any direct formatting or character style properties of text that immediately precedes the cursor when the text is pasted. Graphical elements are discarded, and tables are converted to a series of paragraphs. |
Property Paths
You can access this nested property as listed below:
Library | Object Type | Path to PasteMode |
---|---|---|
ASP.NET Web Forms Controls | ASPxHtmlEditor |
|
ASP.NET MVC Extensions | HtmlEditorBinderSettings |
|
HtmlEditorSettings |
|
Remarks
Use the PasteMode property to specify how the ASPxHtmlEditor formats the pasted HTML content.
If the ASPxHtmlEditorHtmlEditingSettings.EnablePasteOptions is set to true
, end-users can change the format of the pasted HTML content using buttons which appear in the top right corner of the design area after the content is pasted.
Additionally, you can format the pasted HTML content in code using the client-side ASPxClientHtmlEditor.BeforePaste event.
To learn more, see the Paste Formatting topic.