Couldn't find any relevant api to insert image/text/markdown. Muya.setContent replaces everything.
I noticed a lot more functions in muya library that is packaged within marktext like insertImage, replaceImage and so on. But this standalone library lacks those.