Skip to Content
Table of Contents
Quick Take
Ignores code tags and their contents
A bypass callback and a do-nothing callback
Strip an entire CDATA section
Keep a link destination next to its label
Put a retained link destination on a new paragraph
Strip a JSX component tag from surrounding text
Retain href and link label
Leave only HTML
Leave only opening td tags
Leave only td tags
Minimal example using Ranges
Preserve indentation while collapsing whitespace around stripped tags
Leave JSP scriptlets intact while stripping HTML
Preserve punctuation around removed inline tags
Preserve literal comparison brackets in plain text
Insert spaces when removing tags between adjacent text
Map progress reporting into a custom percentage range
Remove all HTML from a string
Strip script tags but retain their text when paired-content removal is disabled
Strip HTML from a raw JSON string
Remove a selected tag pair together with its contents
Preserve custom elements while stripping recognised HTML tags
Set the title case using title package
Trim ordinary spaces while preserving tabs and line breaks
Orphan removal from text within HTML
Wrap a retained link destination with custom markers