Hi,
I haven’t found a way to make y-monaco work with React yet.
The best way to use Monaco in React seems to be using this package GitHub - suren-atoyan/monaco-react: Monaco Editor for React - use the monaco-editor in any React application without needing to use webpack (or rollup/parcel/etc) configuration files / plugins.
In this codesandbox example, I try to use a hook to bind yjs to the Monaco editor.
- There is an error “$csb__lder_js.createStringBuilder is not a function”
- When I run this code in my Nextjs project, it works, I can edit some text in the Monaco editor, it syncs, but then it stops syncing and the ydoc text type gets stuck, even if I try to consult it from the official y-monaco demo, for instance.
Did someone manage to use yjs, monaco and React all together ?
Regards