So after some research I picked prosemirror which is used by Confluence but prosemirror is the harder to learn and the most flexible, there was also Slate which is used by Slite but it was not as flexible as prosemirror and less robust . Notion and Google docs are using their own custom editor BTW.
If you are looking for a rich text editor, there are surprisingly a lot of ressources. Either search for "rich text editor", "slate vs prosemirror" in Google, or my preferred way to get quality information. Search "prosemirror" in the HN search and read the threads [2]
The big complain I have with prosemirror is the fact that there is no official repository of Plug-ins instead everyone is rebuilding everything
[2] https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...