ProseMirror / prosemirror

The ProseMirror WYSIWYM editor
http://prosemirror.net/
MIT License
7.53k stars 334 forks source link

`prosemirror-schema-list` reference documentation cites incorrect usage of `addListNodes` #1427

Closed dslatkin closed 8 months ago

dslatkin commented 8 months ago

The reference manual page for prosemirror-schema-list gives the following instructions for how to use addListNodes to merge schemas:

Using this would look something like this:

const mySchema = new Schema({
  nodes: addListNodes(baseSchema.nodeSpec, "paragraph block*", "block"),
  marks: baseSchema.markSpec
})

but that doesn't work for me using up-to-date ProseMirror dependencies, I instead had to use baseSchema.spec.nodes and baseSchema.spec.marks. I tried to hunt down the text to suggest the change myself, but closest match I could find was in prosemirror-schema-list's README which which is actually correct, strangely enough.

marijnh commented 8 months ago

Where are you reading this? Because the reference also seems to be up to date.

marijnh commented 8 months ago

Ah, you have a /version/0.20.0 in that URL. Remove that.