# Parse from HTML once, then use with Markdown after?

**URL:** https://discuss.prosemirror.net/t/parse-from-html-once-then-use-with-markdown-after/162
**Category:** Uncategorized
**Created:** [February 7, 2016, 10:51pm UTC](https://discuss.prosemirror.net/t/parse-from-html-once-then-use-with-markdown-after/162 "2016-02-07T22:51:31Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jefffriesen](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/jefffriesen/32/120_2.png) [@jefffriesen](https://discuss.prosemirror.net/u/jefffriesen)
#### Post date: [February 7, 2016, 10:51pm UTC](https://discuss.prosemirror.net/t/parse-from-html-once-then-use-with-markdown-after/162/1 "2016-02-07T22:51:31Z")

</div>

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

---

<div class="post-metadata">

### Author: ![marijn](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/marijn/32/15_2.png) [@marijn](https://discuss.prosemirror.net/u/marijn)
#### Post date: [February 8, 2016, 9:52am UTC](https://discuss.prosemirror.net/t/parse-from-html-once-then-use-with-markdown-after/162/2 "2016-02-08T09:52:30Z")

</div>

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

---

<div class="post-metadata">

### Author: ![burlesona](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/burlesona/32/215_2.png) [@burlesona](https://discuss.prosemirror.net/u/burlesona)
#### Post date: [July 24, 2016, 10:04pm UTC](https://discuss.prosemirror.net/t/parse-from-html-once-then-use-with-markdown-after/162/3 "2016-07-24T22:04:30Z")

</div>

@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?
