# Prosemirror-markdown with custom schema

**URL:** https://discuss.prosemirror.net/t/prosemirror-markdown-with-custom-schema/2539
**Category:** Uncategorized
**Created:** [February 17, 2020, 11:06am UTC](https://discuss.prosemirror.net/t/prosemirror-markdown-with-custom-schema/2539 "2020-02-17T11:06:35Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ralc](https://discuss.prosemirror.net/letter_avatar_proxy/v4/letter/r/e99b99/32.png) [@ralc](https://discuss.prosemirror.net/u/ralc)
#### Post date: [February 17, 2020, 11:06am UTC](https://discuss.prosemirror.net/t/prosemirror-markdown-with-custom-schema/2539/1 "2020-02-17T11:06:35Z")

</div>

Hello,

I am new to prosemirror and came up with an error which I cannot figure out. I am using a custom schema and prosemirror-markdown as I have custom markup as well. When I am typing I see the error below **looks like multiple versions of prosemirror-model were loaded**. However, if I use defaultMarkdownParser everything is ok, my custom schema is not to blame, can look exactly the same as the one in prosemirror-markdown and I still receive an error. The check **nodes instanceof Fragment** fails although it should not.

> let schema = new Schema(…); new EditorView(container, { state : EditorState.create({ doc: (new MarkdownParser(schema, …)).parse(markup) }) })

> index.es.js?a958:322 Uncaught RangeError: Can not convert \<“Testing a boldd”\> to a Fragment (looks like multiple versions of prosemirror-model were loaded) at Function.from (index.es.js?a958:322) at NodeType.create (index.es.js?a958:1950) at NodeContext.finish (index.es.js?304a:2731) at ParseContext.finish (index.es.js?304a:2997) at DOMParser.parse (index.es.js?304a:2566) at parseBetween (index.es.js?576a:2387) at readDOMChange (index.es.js?576a:2446) at DOMObserver.eval (index.es.js?576a:3121) at DOMObserver.flush (index.es.js?576a:3039) at MutationObserver.DOMObserver.observer (index.es.js?576a:2912)

Can you please help me with this one?

---

<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 17, 2020, 11:22am UTC](https://discuss.prosemirror.net/t/prosemirror-markdown-with-custom-schema/2539/2 "2020-02-17T11:22:41Z")

</div>

`Fragment.from` is receiving an object that looks like a `Fragment` but isn’t `instanceof Fragment`, so it’s raising that error, since bundlers loading multiple versions of the library has come up before. As such, the first thing you should do is ensure that this isn’t the case.

---

<div class="post-metadata">

### Author: ![ralc](https://discuss.prosemirror.net/letter_avatar_proxy/v4/letter/r/e99b99/32.png) [@ralc](https://discuss.prosemirror.net/u/ralc)
#### Post date: [February 17, 2020, 11:26am UTC](https://discuss.prosemirror.net/t/prosemirror-markdown-with-custom-schema/2539/3 "2020-02-17T11:26:53Z")

</div>

Apparently there is only one version, I will check it out again to see if I can figure out.

> ├─┬ prosemirror-markdown@1.4.4 │ └── prosemirror-model@1.9.1 deduped ├── prosemirror-model@1.9.1 ├─┬ prosemirror-schema-basic@1.1.2 │ └── prosemirror-model@1.9.1 deduped ├─┬ prosemirror-state@1.3.2 │ └── prosemirror-model@1.9.1 deduped ├─┬ prosemirror-transform@1.2.3 │ └── prosemirror-model@1.9.1 deduped └─┬ prosemirror-view@1.14.2 └── prosemirror-model@1.9.1 deduped

---

<div class="post-metadata">

### Author: ![ralc](https://discuss.prosemirror.net/letter_avatar_proxy/v4/letter/r/e99b99/32.png) [@ralc](https://discuss.prosemirror.net/u/ralc)
#### Post date: [February 19, 2020, 6:55am UTC](https://discuss.prosemirror.net/t/prosemirror-markdown-with-custom-schema/2539/4 "2020-02-19T06:55:06Z")

</div>

Providing the EditorView with domParser: DOMParser(schema) temporarily fixed the problem 2d ago, in the meantime I discovered the real cause and made sure I have only one prosemirror-\*. Thank you.
