# Expose more of paste handling internal functions in the API?

**URL:** <https://discuss.prosemirror.net/t/expose-more-of-paste-handling-internal-functions-in-the-api/993>\
**Category:** Uncategorized\
**Created:** [October 10, 2017, 5:20pm UTC](https://discuss.prosemirror.net/t/expose-more-of-paste-handling-internal-functions-in-the-api/993 "2017-10-10T17:20:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kapouer](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/kapouer/32/227_2.png) [@kapouer](https://discuss.prosemirror.net/u/kapouer)\
**Post date:** [October 10, 2017, 5:20pm UTC](https://discuss.prosemirror.net/t/expose-more-of-paste-handling-internal-functions-in-the-api/993/1 "2017-10-10T17:20:01Z")

</div>

I’m using prosemirror in a CMS where developers of new “node types” don’t need to know that much about prosemirror. One just need to return DOM templates.

Anyway, i noticed that inserting properly a DOM node in prosemirror is quite a difficult thing to do. Luckily for me, it’s a problem solved in prosemirror-view internal’s parseFromClipboard function - that part [https://github.com/ProseMirror/prosemirror-view/blob/696020015eab900255edfec40c3c8e95a993d005/src/clipboard.js#L62-L71](https://github.com/ProseMirror/prosemirror-view/blob/696020015eab900255edfec40c3c8e95a993d005/src/clipboard.js#L62-L71)

Exposing that part or making it possible to call it even in an undocumented way would be awesome.

---

<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:** [October 10, 2017, 7:21pm UTC](https://discuss.prosemirror.net/t/expose-more-of-paste-handling-internal-functions-in-the-api/993/2 "2017-10-10T19:21:26Z")

</div>

It is possible to call it in an undocumented way (it’s exported as `__parseFromClipboard` for testing purposes).

But could you describe the problem in a bit more detail? (`handlePaste` already passes you the parsed slice.)

---

<div class="post-metadata">

**Author:** ![kapouer](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/kapouer/32/227_2.png) [@kapouer](https://discuss.prosemirror.net/u/kapouer)\
**Post date:** [October 11, 2017, 9:32am UTC](https://discuss.prosemirror.net/t/expose-more-of-paste-handling-internal-functions-in-the-api/993/3 "2017-10-11T09:32:51Z")

</div>

Well, that’s true… I wasn’t keen on Calling directly parseFromClipboard because it meant converting the DOM node i wanted to parse to html before passing it to parseFromClipboard. Still, it works 🙂
