Show theme settings Shopping cart Download trialFree Trial
Change Theme Settings
Change Theme Settings
Show All Themes

Paste Formatting

Apply Changes
  • Undo (Ctrl+Z)
  • Redo (Ctrl+Y)
  • v
  • v
  • Bold (Ctrl+B)
  • Italic (Ctrl+I)
  • Underline
  • Strikethrough
  • Align Left (Ctrl+L)
  • Align Center (Ctrl+E)
  • Align Right (Ctrl+R)
  • Insert Image (Ctrl+G)
  • Keep Source Formatting
  • Merge Formatting
  • Keep Plain Text
Copy a part of editor content and paste it with formatting specified by the PasteMode combo box. Use the buttons that appear in the top right corner of the design area to change the paste formatting mode for the just pasted content.

The DevExpress ASP.NET MVC HtmlEditor extension can automatically format pasted HTML content based on the SettingsHtmlEditing.PasteMode property, which can be set to one of the following values.

  • SourceFormatting - The formatting of the pasted content is retained.
  • MergeFormatting - The formatting of the pasted content is mostly discarded. However, emphasis formatting, such as bold and italic text, is retained when it is applied to only a portion of the selection.
  • PlainText - The formatting of the pasted content and non-text elements, such as pictures or tables, is discarded.

End-users can change formatting of the pasted HTML content using buttons, which appear in the top right corner of the design area after content is pasted. By default, this functionality is disabled. Set the SettingsHtmlEditing.EnablePasteOptions property to true to enable it.

You can also format the pasted HTML content in code using the client-side BeforePaste event. To explore this functionality, review the Manual Paste Formatting demo.

Local Copy of this Demo
To inspect the source code for this demo on your machine, you must first install our components via the DevExpress Component Installer.
You can open a local copy of this online demo directly from this webpage (if using v20.2.8, 21.1.4 or higher).
Open CS Solution
The source code files for this demo are installed (by default) in the following directory:
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\MVCxHTMLEditorDemos