The WYSIWYG editor will provide you typically html. I believe that is what you have saved in your database.
To embed html into the template, you just need to use triple brackets to tell handlebars to not escape it.
Hi @jan_blaha thanks for all the things you've done. I used these concepts to solve my task. I used this to solve my queries: displayHeaderFooter
headerTemplate, footerTemplate