# SanitizeHtmlOptions (@salmonui/rich-text)

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

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

```ts
import type { SanitizeHtmlOptions } 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 SanitizeHtmlOptions {
    embedHosts?: readonly string[];
    sanitize?: SanitizeHook;
    blockIds?: boolean;
    allow?: SanitizeAllow | readonly SanitizeAllow[];
}
```

Members (4):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `embedHosts` | `embedHosts?: readonly string[];` | optional | Hostnames whose `<iframe src>` embeds are kept (`www.youtube-nocookie.com`, or `*.example.com` for subdomains). Default: none, so iframes are dropped. |
| `sanitize` | `sanitize?: SanitizeHook;` | optional | Further restriction, see SanitizeHook. |
| `blockIds` | `blockIds?: boolean;` | optional | Keep `data-block-id` attributes (BlockEditor ids). Default: true. |
| `allow` | `allow?: SanitizeAllow \| readonly SanitizeAllow[];` | optional | Elements and attributes editor extensions add. It can widen the vocabulary only with inert markup: script, style, iframe, object, embed, forms and foreign content, `on*` handlers, `style` and URL carriers other than href / cite / src / poster (checked by the URL rules) are refused. |
