# Turn a div into an editor

**URL:** <https://discuss.prosemirror.net/t/turn-a-div-into-an-editor/2341>\
**Category:** Uncategorized\
**Created:** [November 14, 2019, 11:37am UTC](https://discuss.prosemirror.net/t/turn-a-div-into-an-editor/2341 "2019-11-14T11:37:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lcswillems](https://discuss.prosemirror.net/letter_avatar_proxy/v4/letter/l/e5b9ba/32.png) [@lcswillems](https://discuss.prosemirror.net/u/lcswillems)\
**Post date:** [November 14, 2019, 11:37am UTC](https://discuss.prosemirror.net/t/turn-a-div-into-an-editor/2341/1 "2019-11-14T11:37:43Z")

</div>

Hi,

I have a `div` containing paragraphs. I would like to turn this div into a ProseMirror editor. How could I do?

I know I can create an editor state from the content of this div and then pass the state to the editor view, but it will necesseraly be appended to an element, what is not what I would like to have.

Thank you for the help, Lucas

---

<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:** [November 15, 2019, 8:23am UTC](https://discuss.prosemirror.net/t/turn-a-div-into-an-editor/2341/2 "2019-11-15T08:23:46Z")

</div>

Have you tried the `mount` variant of the [`EditorView` constructor](http://prosemirror.net/docs/ref/#view.EditorView.constructor)?

---

<div class="post-metadata">

**Author:** ![lcswillems](https://discuss.prosemirror.net/letter_avatar_proxy/v4/letter/l/e5b9ba/32.png) [@lcswillems](https://discuss.prosemirror.net/u/lcswillems)\
**Post date:** [November 15, 2019, 8:57am UTC](https://discuss.prosemirror.net/t/turn-a-div-into-an-editor/2341/3 "2019-11-15T08:57:24Z")

</div>

No, I missed it… It works perfectly! Thank you for your answer and your huge work in this library 🙂
