Web Clipper: change heading level within clipped content

I wanted the whole of {{content}} to be under a single easily foldable H2 heading. But content which contains H2 headings threw a wrench in my works. After lots of trial and error, I solved it with replace_tags. Saving future googlers some trouble:

{{contentHtml|replace_tags:"h6":"strong"|replace_tags:"h5":"h6"|replace_tags:"h4":"h5"|replace_tags:"h3":"h4"|replace_tags:"h2":"h3"|markdown}}

This lowers all headings one level down, and makes H6 bold instead:

Before After
H2 H3
H3 H4
H4 H5
H6 Bold

Alternatively, formatting everything as a blockquote:

{{content|blockquote}}

or as callout:

{{content|callout}}

works too–but this won’t allow to link to or embed individual blocks, which is a loss in my book.

1 Like

This also works:

{{contentHtml|replace:("h6":"strong","h5":"h6","h4":"h5","h3":"h4","h2":"h3")|markdown}}