Hi,
I was trying to setup a simple example with the latest version (0.14.1) and I’m hitting a weird bug/misconfiguration.
I’m using a simplification of the code at https://github.com/ProseMirror/website/blob/master/src/demo/basic.js and the page throws an exception Every schema needs a 'doc' type
. Which is weird because it’s just extending the base schema.
I tried following the code, and the culprit seems to be that OrderedMap.from
doesn’t recognise the value as being an instance of OrderedMap
(which it is! I can see it in the developer console) so the schema ends up being an OrderedMap
with the keys content
, find
, get
(ie. the methods in the OrderedMap
class)… instead of the original schema keys (doc
, paragraph
, blockquote
, …).
So it seems that somehow OrderedMap
gets defined twice or something, and my code uses one definition, while the from
method is using another definition. But I have no idea how to figure it out. Any ideas?