diff --git a/docs/src/docPages/api/extensions/collaboration-cursor.md b/docs/src/docPages/api/extensions/collaboration-cursor.md index 6b1b4eba..d0e2442b 100644 --- a/docs/src/docPages/api/extensions/collaboration-cursor.md +++ b/docs/src/docPages/api/extensions/collaboration-cursor.md @@ -3,7 +3,7 @@ This extension adds information about all connected users (like their name and a Open this page in multiple browser windows to test it. -:::premium Pro Extension +:::pro Pro Extension We kindly ask you to [sponsor our work](/sponsor) when using this extension in production. ::: diff --git a/docs/src/docPages/api/extensions/collaboration.md b/docs/src/docPages/api/extensions/collaboration.md index 30a64957..16d515c2 100644 --- a/docs/src/docPages/api/extensions/collaboration.md +++ b/docs/src/docPages/api/extensions/collaboration.md @@ -1,9 +1,13 @@ # Collaboration -The Collaboration extension enables you to collaborate with others on one document. The implementation is based on [Y.js by Kevin Jahns](https://github.com/yjs/yjs), which is the coolest thing to [integrate collaborative editing](/guide/collaborative-editing) in your project. + +[![Version](https://img.shields.io/npm/v/@tiptap/extension-collaboration.svg?label=version)](https://www.npmjs.com/package/@tiptap/extension-collaboration) +[![Downloads](https://img.shields.io/npm/dm/@tiptap/extension-collaboration.svg)](https://npmcharts.com/compare/@tiptap/extension-collaboration?minimal=true) + +The Collaboration extension enables you to collaborate with others in a single document. The implementation is based on [Y.js by Kevin Jahns](https://github.com/yjs/yjs), which is the coolest thing to [integrate collaborative editing](/guide/collaborative-editing) in your project. The history works totally different in a collaborative editing setup. If you undo a change, you don’t want to undo changes of other users. To handle that behaviour this extension provides an own `undo` and `redo` command. Don’t load the default [`History`](/api/extensions/history) extension together with the Collaboration extension to avoid conflicts. -:::premium Pro Extension +:::pro Pro Extension We kindly ask you to [sponsor our work](/sponsor) when using this extension in production. ::: @@ -22,10 +26,19 @@ yarn add @tiptap/extension-collaboration yjs y-websocket | provider | `Object` | `null` | A Y.js network connection, for example a [y-websocket](https://github.com/yjs/y-websocket) instance. | ## Commands -*None* +| Command | Parameters | Description | +| ------- | ---------- | --------------------- | +| undo | — | Undo the last change. | +| redo | — | Redo the last change. | ## Keyboard shortcuts -*None* +### Undo +* Windows/Linux: `Control` `Z` +* macOS: `Cmd` `Z` + +### Redo +* Windows/Linux: `Shift` `Control` `Z` or `Control` `Y` +* macOS: `Shift` `Cmd` `Z` or `Cmd` `Y` ## Source code [packages/extension-collaboration/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-collaboration/) diff --git a/docs/src/docPages/api/extensions/history.md b/docs/src/docPages/api/extensions/history.md index 5e8b9d97..19d9630f 100644 --- a/docs/src/docPages/api/extensions/history.md +++ b/docs/src/docPages/api/extensions/history.md @@ -28,8 +28,8 @@ yarn add @tiptap/extension-history * macOS: `Cmd` `Z` ### Redo -* Windows/Linux: `Shift` `Control` `Z` -* macOS: `Shift` `Cmd` `Z` +* Windows/Linux: `Shift` `Control` `Z` or `Control` `Y` +* macOS: `Shift` `Cmd` `Z` or `Cmd` `Y` ## Source code [packages/extension-history/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-history/) diff --git a/docs/src/docPages/guide/collaborative-editing.md b/docs/src/docPages/guide/collaborative-editing.md index 386dbb28..804a8425 100644 --- a/docs/src/docPages/guide/collaborative-editing.md +++ b/docs/src/docPages/guide/collaborative-editing.md @@ -1,15 +1,9 @@ # Collaborative editing -:::premium Become a sponsor +:::pro Become a sponsor Using collaborative editing in production? Do the right thing and [sponsor our work](/sponsor)! ::: - - ## toc ## Introduction @@ -205,6 +199,12 @@ Yes, it’s magic. As already mentioned, that is all based on the fantastic Y.js ## Store the content Our collaborative editing backend is ready to handle advanced use cases, like authorization, persistence and scaling. Let’s go through a few common use cases here! +:::pro Backend as a Service (Paid) +Don’t want to wrap your head around the backend part? No worries, we offer a managed backend. For less than 1.000 documents, it’s $49/month (VAT may apply) and probably saves you a ton of time. + +Send us an email to [humans@tiptap.dev](mailto:humans@tiptap.dev) for further details. +::: + ### Authentication With the `onConnect` hook you can write a custom Promise to check if a client is authenticated. That can be a request to an API, to a microservice, a database query, or whatever is needed, as long as it’s executing `resolve()` at some point. You can also pass contextual data to the `resolve()` method which will be accessible in other hooks. @@ -312,6 +312,8 @@ const server = Server.configure({ server.listen() ``` +There is no method to restore documents from an external source, so you’ll need a [persistence driver](#persist-the-document) though. Those persistence drivers store every change to the document. That’s probably not needed in your external source, but is needed to make the merging of changes conflict-free in the collaborative editing backend. + ### Scale with Redis (Advanced) To scale the WebSocket server, you can spawn multiple instances of the server behind a load balancer and sync changes between the instances through Redis. Install the Redis adapter and register it with hocuspocus: diff --git a/docs/src/docPages/introduction.md b/docs/src/docPages/introduction.md index 8a4b04e2..93472ef9 100644 --- a/docs/src/docPages/introduction.md +++ b/docs/src/docPages/introduction.md @@ -1,8 +1,8 @@ --- -title: Headless rich text editor +title: A Headless Rich Text WYSIWYG Editor --- -# tiptap – a headless text editor framework +# tiptap – a headless text editor [![Version](https://img.shields.io/npm/v/@tiptap/core.svg?label=version)](https://www.npmjs.com/package/@tiptap/core) [![Downloads](https://img.shields.io/npm/dm/@tiptap/core.svg)](https://npmcharts.com/compare/@tiptap/core?minimal=true) [![License](https://img.shields.io/npm/l/@tiptap/core.svg)](https://www.npmjs.com/package/@tiptap/core) diff --git a/docs/src/templates/DocPage/style.scss b/docs/src/templates/DocPage/style.scss index f742872b..69ce9963 100644 --- a/docs/src/templates/DocPage/style.scss +++ b/docs/src/templates/DocPage/style.scss @@ -263,7 +263,7 @@ color: $colorRed; } - &.premium { + &.pro { border-color: rgba($colorOrange, 0.1); background-color: rgba($colorOrange, 0.1); color: $colorOrange;