I’ve had some success attempting paging by defining all my elements under a ‘page’ node. The top level doc in the schema only accepts content of ‘page+’, then the page node accepts all the regular elements.
As marijn has said it is quite complicated since you then have to define a custom keymap to handle special key inputs like enter and backspace for instance. Then you also have to handle moving the page content or nodes to the next page when you hit your page length from the browser DOM. It also requires the splitting of long nodes into two when they extend across the page boundary etc. Then do the opposite and join them on backspace for previously split nodes
…and that’s just getting started. Pretty complicated! But I at least proved it’s quite possible. There may be better ways to implement but that seemed to work, mostly! I just proved I could do it kind of… I plan on finishing someday. Seems to be much easier to build using prosemirror then in other contenteditable based editors I’ve looked at though.
If anyone has any easier ways to implement, I’d like to hear! I attempted this on 0.10 before decorators were a thing so there might be some possibilities using decoration ?
EDIT: I think the keymap is unnecessary actually, but you need to do extendTransformAction in onAction to modify your pages based on the length plus the other complexities