ycs icon indicating copy to clipboard operation
ycs copied to clipboard

need demo for prosemirror

Open alex521 opened this issue 4 years ago • 7 comments

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 ?

alex521 avatar Dec 15 '20 07:12 alex521

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.

dmonad avatar Dec 15 '20 14:12 dmonad

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

aleksk avatar Feb 10 '21 04:02 aleksk

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

alex521 avatar Feb 21 '21 05:02 alex521

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
> [email protected] build C:\src\ycs\samples\YcsSample\ClientApp
> react-scripts build
Creating an optimized production build...
Compiled successfully.

aleksk avatar Feb 22 '21 18:02 aleksk

yjs version is 13.5.1 , can not find encodeStateVectorV2 function.

alex521 avatar Mar 02 '21 05:03 alex521

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

dmonad avatar Mar 03 '21 11:03 dmonad

Updated packages.json to only use 3.4.14.

aleksk avatar Mar 03 '21 17:03 aleksk