MarkupProps
Hierarchy
- ParserProps
- MarkupProps
Index
Properties
optionalallowAttributes
optionalallowElements
Disable filtering and allow all non-banned/blocked HTML elements to be rendered.
optionalallowList
List of HTML tag names to allow and render. Defaults to the ALLOWED_TAG_LIST
constant.
optionalattributes
HTML attributes to pass to the wrapping element.
optionalblockList
List of HTML tag names to disallow and not render. Overrides allow list.
optionalclassName
CSS class name to pass to the wrapping element.
optionalcontainerTagName
The container element to parse content in. Applies browser semantic rules and overrides tagName
.
optionalcontent
Content that may contain HTML to safely render.
optionaldisableLineBreaks
Disable the conversion of new lines to <br />
elements.
optionalemptyContent
Content to render when the content
prop is empty.
optionalescapeHtml
Escape all HTML before parsing.
optionalnoHtml
Strip all HTML while rendering.
optionalnoHtmlExceptMatchers
Strip all HTML, except HTML generated by matchers, while rendering.
optionalnoWrap
Don’t wrap the content in a new element specified by tagName
.
optionaltagName
HTML element to wrap the content. Also accepts ‘fragment’ (superseded by noWrap
).
optionaltransform
Transformer ran on each HTML element. Return a new element, null to remove current element, or undefined to do nothing.
optionaltransformOnlyAllowList
Disable transformer for non-allowList tags.
Disable filtering and allow all non-banned HTML attributes.