This example demonstrates the paste cleanup feature of the RichTextEditor control. Paste your content in the editor after configuring the corresponding options and cleanup settings.
The pasted content can be cleaned up using pasteCleanup settings. The following settings are available to clean up the content:
Format Optiondrop down list for the paste content.
Promptoption to invoke prompt dialog with paste options on pasting the content in editor.
Plain Textoption to paste the content as plain text.
Keep Formatoption to keep the same format with copied content.
Clean Formatoption to keep the same format with copied content.
denied tagstext box to ignore the tags when pasting HTML content. For example:
['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.
denied attributesto paste the content by filtering out these attributes from the content. For example:
['id', 'title']- This will remove the attributes 'id' and 'title' from all tags.
['color', 'margin']- This will allow only the style properties 'color' and 'margin' in each pasted element.
The previous features were built as modules to be included in your application. For example, inject the
'PasteCleanup' module using
RichTextEditor.Inject (Toolbar, Link, Image, Count, HtmlEditor, PasteCleanup) to use the paste cleanup feature.