After doing a research and exploring for a while, I haven’t found any satisfactory solution for this exact task, which you want to achieve. I havent quite understood, what kind of editor you want, like, if you want the exact Obsidian’s Live Preview Editor, then there is no direct way to do this, atleast I havent found one. But if you want a basic editor, then you can go with Codemirror. I personally felt it to complex and a lengthy process, and I was not sure if the end result would be worth it. Because I wanted a proper Live editor, just like the normal one, where users can paste images and documents directly.
Just sharing, incase if this helps : Obsidian Editor inside AddOrEditTaskModal · Issue #50 · tu2-atmanand/Task-Board · GitHub
Also here is something, you might wanna try : How to get Obsidian Editor inside Modal - #3 by unxok