Example of PasteSettings in ASP.NET MVC BlockEditor Control

This sample demonstrates the Block Editor pasteCleanupSettings property, which allows you to define various options to control how content is pasted into the editor.

DEMO
SOURCE

The following settings are available to clean up the content in the pasteCleanup settings property:

  • Select any option in the Format Option dropdown list for the pasted content.
    • Select the Plain Text option to paste the content as plain text.
    • Select the Keep Format option to retain the format of the copied content.
  • Fill the Denied Tags textbox to ignore specific tags when pasting HTML content.
    • ['a[!href]'] - Paste the content by filtering anchor tags that don't have the 'href' attribute.
    • ['a[href, target]'] - Paste the content by filtering anchor tags that have the 'href' and 'target' attributes.
  • Fill the Allowed Style properties to paste the content by accepting these style attributes and removing others.
    • ['color', 'margin'] - This will allow only the style properties 'color' and 'margin' in each pasted element.
Transform your ASP.NET MVC web apps today with Syncfusion® ASP.NET MVC components
145+ high-performance and responsive UI components
Dedicated support
Hassle-free licensing
TRY IT FOR FREE
opens in a new tab