WordPress wp_editor to post and edit

I’m assuming you would have an Edit page and an Add New page, so why not just switch out the wp_insert_post function from the Add New page to wp_update_post?

The first argument for wp_editor is the content you want to appear, so just use the current post that’s being edited’s content.