WYSIWYG is kinda difficult for developers to control the allowed HTML part as it can generate a lot of gibberish and null characters. The same goes with contenteditable too. The good thing is, if you have Markdown, you can export it to HTML, text, doc, PDF, or any other format.