DanielOX better start a new support discussion if you are not the original poster.
Posts are stored in the database as XML. We use the TextFormatter library which you can learn more about here https://s9etextformatter.readthedocs.io/Getting_started/How_it_works/
If you are importing your own content, you should pre-parse it before inserting it in the database.