when I try to print in the console all nodes in the positions from 0 until doc.content.size this is what happened:
Is this normal behavior ? Is it expected that some positions might not have a node ?
I came across this while debugging a problem in my application and just wanted to make sure this is not a bug in ProseMirror or a problem with my schema definition or something else.
this is how JSON.stringify(currentCanvasState.doc.toJSON()) looks like in case it helps:
{
"type": "doc",
"content": [{
"type": "section",
"attrs": {
"id": "section_1"
},
"content": [{
"type": "sectionHeader",
"attrs": {
"id": "section_1_header",
"sectionId": "section_1",
"text": "Section 1",
"dueDate": null,
"index": 0
}
}, {
"type": "sectionContent",
"attrs": {
"id": "section_1_content",
"collapsed": false
},
"content": [{
"type": "paragraph",
"content": [{
"type": "text",
"text": "2"
}]
}, {
"type": "paragraph",
"content": [{
"type": "text",
"text": "FFF"
}]
}, {
"type": "paragraph",
"content": [{
"type": "text",
"text": "22"
}]
}, {
"type": "paragraph",
"content": [{
"type": "text",
"text": "12312312312312333"
}]
}, {
"type": "paragraph",
"content": [{
"type": "text",
"text": "ff2222ff22222fffffffffffffffffff22ffffffffffffsasdasdasdasdasdasd"
}]
}]
}]
}]
}