Options
All
  • Public
  • Public/Protected
  • All
Menu

Options for HtmlSanitizer

Hierarchy

Index

Properties

Optional additionalAllowedAttributes

additionalAllowedAttributes: string[]

Allowed HTML attributes in addition to default attributes, in lower case

Optional additionalAllowedCssClasses

additionalAllowedCssClasses: string[]

Allowed CSS Class names

Optional additionalDefaultStyleValues

additionalDefaultStyleValues: StringMap

CSS style default values in addition to the default value map, style name should be in lower case

Optional additionalGlobalStyleNodes

additionalGlobalStyleNodes: HTMLStyleElement[]

Additional global CSS style nodes

Optional additionalPredefinedCssForElement

additionalPredefinedCssForElement: PredefinedCssMap

Additional predefined CSS for element

Optional additionalTagReplacements

additionalTagReplacements: Record<string, string>

Additional tag replacement, to allow replace a tag to another name, or remove it.

The value can be: '*': Keep this element with no change ': Keep this element but change its tag to the given value null: Remove this element

For other unknown tags, we will respect the value of unknownTagReplacement with the same meaning

Optional attributeCallbacks

attributeCallbacks: AttributeCallbackMap

Callbacks for HTML attributes

Optional cssStyleCallbacks

cssStyleCallbacks: CssStyleCallbackMap

Callbacks for CSS styles

Optional elementCallbacks

elementCallbacks: ElementCallbackMap

Callbacks for HTML elements

Optional preserveHtmlComments

preserveHtmlComments: boolean

Preserve HTML comments

Optional unknownTagReplacement

unknownTagReplacement: string

Define a replacement tag name of unknown tags. A star "*" means keep as it is, no replacement Other valid string means replace the tag name with this string. Empty string, undefined means drop such elements and all its children

default

undefined

Generated using TypeDoc