How can i use y-prosemirror in React, can anyone please share an example
There is nothing special about using y-prosemirror in React, or any other front-end framework for that matter. I recommend brushing up on how to access DOM elements in your framework of choice.
With y-prosemirror, you just need to initiate the editor in a useEffect hook. Instead of passing document.querySelector('#editor')
, pass a ref
as described here:
2 Likes