Cannot delete block level element when first in view

I was looking at ProseMirror schema example and made a small edit of it on Glitch: schema with block star I changed the star schema from inline to block:

    star: {
      inline: false,
      group: "block",
      selectable: true,
      atom: true,
      toDOM() { return ["star", "🟊"] },
      parseDOM: [{tag: "star"}]

However, when the star is first in the editor, I cannot delete it with delete key: delete_fail

Is this by design - am I missing something? If it’s a bug, what is the best place to open it? (I looked on github, but not sure whether to open in prosemirror-view, schema, core)

You schema indicates that the document should have at least one block node in it (content: "block+"). So when you delete everything, it recreates one block node to satisfy this constraint. Since star appears before other block nodes in the schema, that’s what it’ll create. Moving the star node definition below paragraph in the argument to new Schema will probably make it do what you want.

Thank you, that fixed it and was the issue! I appreciate the prompt response!