View as Markdown

API reference: @salmonui/rich-text

SanitizeHooktype

import type { SanitizeHook } from '@salmonui/rich-text';
type SanitizeHook = (element: SanitizeElement) => SanitizeHookResult;

Extension hook (sanitize). It runs after the built-in allow-list, on every element of the sanitized tree, parents before children. It can only remove or further restrict content; the built-in sanitizing cannot be turned off or widened through it.