This sample demonstrates the Block Editor PasteCleanupSettings property allows you to define various options to control how content is pasted into the editor.
DEMO
SOURCE
Format Option |
|
Denied Tags |
|
The following settings are available to cleanup the content in pasteCleanup settings property:
- Select any option in
Format Optiondrop down list for the paste content. - Select the
Plain Textoption to paste the content as plain text. - Select the
Keep Formatoption to keep the same format in the copied content. - Fill the
denied tagstext box to ignore the 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