# RichTextPasteCleanup (@salmonui/rich-text)

> The RichTextPasteCleanup interface of @salmonui/rich-text.

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

```ts
import type { RichTextPasteCleanup } 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: interface

```ts
interface RichTextPasteCleanup extends Omit<PasteCleanupOptions, 'embedHosts' | 'sanitize'> {
}
```

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `mode` | `mode?: PasteCleanupMode;` | optional, inherited | `'keep'`: keep all formatting the vocabulary allows (fonts, sizes, colors, alignment); `'clean'` (default): keep structure, marks and links, drop presentational styles; `'plainText'`: text only, paragraphs and line breaks kept; `'prompt'`: the editor asks; here it behaves as `'clean'`. |
| `allowedTags` | `allowedTags?: readonly string[];` | optional, inherited | Only these elements survive (others are unwrapped, text kept). Vocabulary names (`strong`, not `b`). |
| `deniedTags` | `deniedTags?: readonly string[];` | optional, inherited | These elements are unwrapped (text kept). |
| `allowedAttributes` | `allowedAttributes?: readonly string[];` | optional, inherited | Only these attributes survive (`style` counts as one). |
| `deniedAttributes` | `deniedAttributes?: readonly string[];` | optional, inherited | These attributes are removed. |
| `keepWordFormatting` | `keepWordFormatting?: boolean;` | optional, inherited | In `'clean'` mode, keep the inline formatting of Word and Google Docs content. Default false. |
| `allow` | `allow?: readonly SanitizeAllow[] \| SanitizeAllow;` | optional, inherited | Passed to the sanitizer: extension elements and attributes. |
