Parse from HTML once, then use with Markdown after?

I have a an app with lots of textareas that get rendered into an HTML report. We’ve allowed storage of simple HTML formatting on the server because some people wanted formatting and knew basic HTML. But ProseMirror is a much better solution. What I would like to do is use Prosemirror to convert the HTML to Markdown when the textarea is initially mounted, then use Markdown after that (and not allow HTML in the database).

Is there a way to set the docFormat to markdown but initially read in a and convert HTML?

Thanks

docFormat only take effect on initialization, so you can simply call getContent with "markdown" as format after that.

@marijn I see the getContent and setContent methods have been dropped in version 0.8, but I cannot find any documentation on how you can get or set content now.

If I have some markdown text already, how can I load it into the editor? And vice-versa, when the editing is complete, how can I export the document to markdown in v0.8?