yjs / ycs

A compatible .Net implementation of the Yjs CRDT framework.
MIT License
140 stars 14 forks source link

need demo for prosemirror #1

Open alex521 opened 3 years ago

alex521 commented 3 years ago

Use github issues for bug reports and feature requests. For general questions, please use https://discuss.yjs.dev/ if use signalr on server , how to use y-prosemirror for client ?

dmonad commented 3 years ago

Hi @aleksk ,

There is a very extensive documentation, demo projects, and even a live-code editor that will help you to setup y-prosemirror. https://docs.yjs.dev/ecosystem/editor-bindings/prosemirror

Before you start using this project, you probably should get familiar with the general concepts of Yjs: https://docs.yjs.dev/getting-started/a-collaborative-editor

You can start with the sample app (https://github.com/yjs/ycs/tree/main/samples/YcsReactMonacoSample/ClientApp) and exchange Monaco for ProseMirror as described in the Yjs documentation.

aleksk commented 3 years ago

ProseMirror requires Y.Xml types, which are not yet ported over from the Yjs :) Created the component so far, but it's not enabled in the sample: https://github.com/yjs/ycs/blob/main/samples/YcsSample/ClientApp/src/components/proseMirror.tsx

alex521 commented 3 years ago

Failed to compile ./src/impl/yjsSignalrConnector.ts line 152 Attempted import error: 'encodeStateVectorV2' is not exported from 'yjs' (imported as 'Y').

aleksk commented 3 years ago

Can't repro the build issue on any of my machines. Maybe yjs dependency wasn't properly restored, or npm/tools are not up-to-date?

ycs\samples\YcsSample\ClientApp>npm run build
> ycs-sample@0.0.1 build C:\src\ycs\samples\YcsSample\ClientApp
> react-scripts build
Creating an optimized production build...
Compiled successfully.
alex521 commented 3 years ago

yjs version is 13.5.1 , can not find encodeStateVectorV2 function.

dmonad commented 3 years ago

The v2 updates feature is not released yet. I removed encodeStateVectorV2 because I plan to make breaking changes to it.

aleksk commented 3 years ago

Updated packages.json to only use 3.4.14.