I stuck with the Idea about the Rich Text Editors could generate HTML that can be stored in DB and output it on render via Template Files.
This is not the case while building RTE with React (NextJS). The Output HTML requires implementation via "dangerouslySetInnerHTML" and my goal is to go based on best Practice.
Therefor I wanted to ask about the best Approach for Editing Content via RTE like Lexical and output that (as HTML?) in React?
My current Approach would be to store the Lexical EditorState as JSON and also as Markdown and use react-markdown Plugin for output (not 100% safe).
While reviewing PayloadCMS, they implemented a kind of "LexicalJSON/MarkdownToJSX" to output RTE created content. However I am sure that there is a better way of handling this and looking forward for your answers and ideas.