# cleanPastedHtml (@salmonui/rich-text)

> The cleanPastedHtml function of @salmonui/rich-text: Cleans clipboard HTML for the editors: Word (mso styles, o:p, conditional comments, MsoListParagraph runs into real nested lists from the mso-list levels, class="Mso*"), Google Docs (the docs-internal-guid wrapper, styled spans into marks, flat nested lists, checklists), then the mode, the tag and attribute filters, and always the sanitizer. Returns HTML in the shared vocabulary.

Canonical: https://salmonui.dev/docs/reference/rich-text/cleanPastedHtml

```ts
import { cleanPastedHtml } from '@salmonui/rich-text';
```

Entry index: https://salmonui.dev/docs/reference/rich-text (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/rich-text.md).

## Reference

Kind: function

```ts
function cleanPastedHtml(html: string, options?: PasteCleanupOptions): string;
```

Cleans clipboard HTML for the editors: Word (mso styles,
`o:p`, conditional comments, MsoListParagraph runs into real nested lists
from the mso-list levels, `class="Mso*"`), Google Docs (the
`docs-internal-guid` wrapper, styled spans into marks, flat nested lists,
checklists), then the mode, the tag and attribute filters, and always the
sanitizer. Returns HTML in the shared vocabulary.
