How to creat WYSWYG editor in react that also parses react elements or jsx?

I know it’s a very generic question but I want to create one web/WYSWYG editor that enables user to put html tags as well as custom components(jsx), similar to what we see in code sandbox.
Any help would be appreciated just need a direction to go. Thanks