I started a new project based on collaborative code editing. I use Next.js and monaco-editor and I got a lot of troubles. Firstly, I can’t use monaco-editor directly in Next.js and found a repo with necessary hooks and webpacks (@monaco-editor/react). This repo got me out of using the ‘monaco-editor’ module, but ‘y-monaco’ is dependent on it. Anyways, with some work, some module transpile and dynamic imports I managed to get the things working…somehow.
(1) Because of dependent y-monaco by monac-editor I only managed to import it in a async function when editor did mount. Have you other solutions ? This is not prior now.
Everything is working for now, it connects, it creates a new room, adds user to awareness.
(2) But nothing is showing. I can see what user select, or the cursor, I can’t see anything except the modification of the content.
Have you encounter similar problems ? Have you any solution to (2) or at least for (1) ?
P.S: If needed I can provide source codes or the github repo