File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed
Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -260,4 +260,7 @@ const provider2 = new TiptapCollabProvider({
260260 name: ' document2' ,
261261 token: ' ' ,
262262})
263+
264+ provider1 .attach () // when passing a socket manually, you need to call attach explicitly
265+ provider2 .attach () // when passing a socket manually, you need to call attach explicitly
263266```
Original file line number Diff line number Diff line change 11# Upgrade Guide
22
3- ## Upgrading to 3.0 from 2.x
3+ ## Upgrading to 3.0 from 2.x (Provider)
4+
5+ The TiptapCollabProvider has been moved to ` @tiptap-pro/provider ` .
6+
7+ When using multiplexing, the providers now need to explicitly call ` attach ` to attach to the websocket.
8+
9+ ``` typescript
10+ import {
11+ TiptapCollabProvider ,
12+ TiptapCollabProviderWebsocket
13+ } from " @tiptap-pro/provider" ;
14+
15+ const socket = new TiptapCollabProviderWebsocket ({
16+ appId: ' ' , // or `url` if using `HocuspocusProviderWebsocket`
17+ })
18+
19+ const provider1 = new TiptapCollabProvider ({
20+ websocketProvider: socket ,
21+ name: ' document1' ,
22+ token: ' ' ,
23+ })
24+
25+ provider1 .attach () // when passing a socket manually, you need to call attach explicitly
26+ ```
27+
28+ More information can be found here: https://github.com/ueberdosis/hocuspocus/releases/tag/v3.1.0
29+
30+ ## Upgrading to 3.0 from 2.x (Server)
431
532With the upgrade to the new version, the initialization of hocuspocus has changed. As described on the [ usage] ( /server/usage )
633side, there are two ways on how you can use hocuspocus. With the built-in server. Or like a library with other
You can’t perform that action at this time.
0 commit comments