New to Kendo UI for AngularStart a free 30-day trial

PasteCleanupSettings

Represents the configuration options for Paste Cleanup (see example).

typescript
const settings: PasteCleanupSettings = {
  convertMsLists: true,
  removeHtmlComments: true,
  stripTags: ['span'],
  removeAttributes: ['lang'],
  removeMsClasses: true,
  removeMsStyles: true,
  removeInvalidHTML: true
};
NameTypeDefaultDescription

convertMsLists?

boolean

Converts MS Word lists to HTML lists when set to true.

removeAttributes?

string[] | "all"

Removes the specified DOM attributes from the HTML. Set to 'all' to remove every attribute. Set to an array to remove specific attributes.

For example, with removeAttributes: ['lang'], <p><span lang=EN-US>content</span></p> becomes <p><span>content</span></p>.

removeHtmlComments?

boolean

Removes HTML comments when set to true.

For example, <!-- comment --> <p> content </p> becomes <p> content </p>.

removeInvalidHTML?

boolean

Removes invalid HTML when set to true.

For example, <p>content <o:p>, <w:sdtPr></p> becomes <p>content </p>.

removeMsClasses?

boolean

Removes class attributes starting with 'Mso' when set to true.

For example, <p class="MsoNormal">pasted from MS Word</p> becomes <p>pasted from MS Word</p>.

removeMsStyles?

boolean

Removes style attributes starting with 'Mso' when set to true.

For example, <p><span style="color:#7C7C7C; mso-themecolor:accent3; mso-themeshade:191;">content</span></p> becomes <p><span style="color: #7C7C7C; background: silver;">content</span></p>.

stripTags?

string[]

Removes the specified tags from the HTML.

For example, with stripTags: ['span'], <p><span lang=EN-US>content</span></p> becomes <p>content</p>.

Not finding the help you need?
Contact Support