ProseMirror/prosemirror-view ? reverse-engineered prompt

Reverse engineered prompt

Build me the browser view layer for a rich text editor like ProseMirror, where the current document is rendered in the page and user actions like typing, selecting text, clicking, and pasting are handled correctly.

I want it to work with custom document schemas and support the kind of editing behavior you’d expect from a serious collaborative editor, while staying well behaved with contentEditable. Please make sure the editor updates smoothly when the document changes, keeps the DOM and document state in sync, and has a clean way to plug in editing rules and event handling.

Use the existing project structure and tests, and look up the current ProseMirror docs online if you need to confirm behavior. Focus on getting the core view component solid and reliable, not on building a whole editor app around it.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab