# SanitizeElement (@salmonui/rich-text)

> The SanitizeElement interface of @salmonui/rich-text: A sanitized element as the sanitize hook sees it (read-only copy).

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

```ts
import type { SanitizeElement } 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 SanitizeElement {
    readonly tag: string;
    readonly attrs: Readonly<Record<string, string>>;
    readonly parent: string | null;
}
```

A sanitized element as the `sanitize` hook sees it (read-only copy).

Members (3):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `tag` | `readonly tag: string;` |  | Lowercase tag name from the vocabulary (`p`, `a`, `img`, `span`, ...). |
| `attrs` | `readonly attrs: Readonly<Record<string, string>>;` |  | The attributes that survived the built-in rules. |
| `parent` | `readonly parent: string \| null;` |  | Tag of the sanitized parent element, or null at the top level. |
