How to get a header from the dough?

I have a text in the database, which is entered using RichTexEditor. There are headings marked with the tag H1 and H2. How can I get only these headers? I need to bring them out on a page in a test element.
Help me please.

This topic was automatically closed after 70 days. New replies are no longer allowed.