This filter will remove anything but the elements matching the given selector(s).
Remove everything except img tags
{{ entry.body | retconOnly( 'img' ) }}
Remove everything except img and span tags
{{ entry.body | retconOnly( [ 'img', 'span' ] ) }}
Remove everything except elements with the classname ".foo"
{{ entry.body | retconOnly( '.foo' ) }}
@selectors Mixed String value or Array of string values Examples: "p" ".foo" "#bar" "div.baz"
"p"
".foo"
"#bar"
"div.baz"
There was an error while loading. Please reload this page.
Introduction, basic usage and settings
Images
DOM manipulation