Skip to content

white-space div on NodeViews? #3453

Closed Answered by nperez0111
WilliamIPark asked this question in Questions & Help
Discussion options

You must be logged in to vote

This is where that white-space: inherit element is created, it has to do with node views' content and is the wrapper element to inject the react rendered content into. The reason that it exists is that prosemirror expects a node view to be generated synchronously, whereas react can only render asynchronously. So we inject this element, and have React render into that.

This is where the data-node-view-content element is create, it is an element rendered by your react app to signal where prosemirror should inject into using that ref there. It has to exist as a handoff from React to prosemirror to not have React destroy the element that prosemirror is trying to render the rich text into.

So,…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by nperez0111
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants