API reference: @salmonui/rich-text
PasteCleanupOptionsinterface
import type { PasteCleanupOptions } from '@salmonui/rich-text';interface PasteCleanupOptions {
mode?: PasteCleanupMode;
allowedTags?: readonly string[];
deniedTags?: readonly string[];
allowedAttributes?: readonly string[];
deniedAttributes?: readonly string[];
keepWordFormatting?: boolean;
embedHosts?: readonly string[];
sanitize?: SanitizeHook;
allow?: SanitizeAllow | readonly SanitizeAllow[];
}
| Name | Signature | Description |
|---|---|---|
modeoptional | mode?: PasteCleanupMode; |
|
allowedTagsoptional | allowedTags?: readonly string[]; | Only these elements survive (others are unwrapped, text kept). Vocabulary names ( |
deniedTagsoptional | deniedTags?: readonly string[]; | These elements are unwrapped (text kept). |
allowedAttributesoptional | allowedAttributes?: readonly string[]; | Only these attributes survive ( |
deniedAttributesoptional | deniedAttributes?: readonly string[]; | These attributes are removed. |
keepWordFormattingoptional | keepWordFormatting?: boolean; | In |
embedHostsoptional | embedHosts?: readonly string[]; | Passed to the sanitizer (see |
sanitizeoptional | sanitize?: SanitizeHook; | Passed to the sanitizer, after the paste filters. |
allowoptional | allow?: SanitizeAllow | readonly SanitizeAllow[]; | Passed to the sanitizer: extension elements and attributes. |