From 86c528830cdb922efff161201de2f3e733182be1 Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Wed, 28 Oct 2020 18:05:20 +0100 Subject: [PATCH] add premium hints everywhere, add premium flags to the navigation, add a license page --- .../Examples/CollaborativeEditing/index.vue | 2 +- .../CollaborationCursor/index.spec.js | 5 + .../Extensions/CollaborationCursor/index.vue | 91 +++++++++++++++++++ .../api/extensions/collaboration-cursor.md | 33 +++++++ .../docPages/api/extensions/collaboration.md | 4 +- .../examples/collaborative-editing.md | 5 + .../docPages/guide/collaborative-editing.md | 5 +- docs/src/docPages/tiptap-pro.md | 3 + docs/src/layouts/App/index.vue | 4 +- docs/src/layouts/App/style.scss | 11 +++ docs/src/links.yaml | 11 ++- docs/src/templates/DocPage/style.scss | 6 +- 12 files changed, 168 insertions(+), 12 deletions(-) create mode 100644 docs/src/demos/Extensions/CollaborationCursor/index.spec.js create mode 100644 docs/src/demos/Extensions/CollaborationCursor/index.vue create mode 100644 docs/src/docPages/tiptap-pro.md diff --git a/docs/src/demos/Examples/CollaborativeEditing/index.vue b/docs/src/demos/Examples/CollaborativeEditing/index.vue index e4f7fe0c..db76709f 100644 --- a/docs/src/demos/Examples/CollaborativeEditing/index.vue +++ b/docs/src/demos/Examples/CollaborativeEditing/index.vue @@ -197,7 +197,7 @@ export default { /* This renders the username above the caret */ .collaboration-cursor__label { position: absolute; - top: -1.6em; + top: -1.4em; left: -1px; font-size: 13px; font-style: normal; diff --git a/docs/src/demos/Extensions/CollaborationCursor/index.spec.js b/docs/src/demos/Extensions/CollaborationCursor/index.spec.js new file mode 100644 index 00000000..cb36824e --- /dev/null +++ b/docs/src/demos/Extensions/CollaborationCursor/index.spec.js @@ -0,0 +1,5 @@ +context('/api/extensions/collaboration', () => { + before(() => { + cy.visit('/api/extensions/collaboration') + }) +}) diff --git a/docs/src/demos/Extensions/CollaborationCursor/index.vue b/docs/src/demos/Extensions/CollaborationCursor/index.vue new file mode 100644 index 00000000..bf290cb1 --- /dev/null +++ b/docs/src/demos/Extensions/CollaborationCursor/index.vue @@ -0,0 +1,91 @@ + + + + + diff --git a/docs/src/docPages/api/extensions/collaboration-cursor.md b/docs/src/docPages/api/extensions/collaboration-cursor.md index 7f003c1a..cf8b74d0 100644 --- a/docs/src/docPages/api/extensions/collaboration-cursor.md +++ b/docs/src/docPages/api/extensions/collaboration-cursor.md @@ -1,2 +1,35 @@ # Collaboration Cursor +:::premium Premium Extension +Using this in production requires a **tiptap pro** license. [Read more](/tiptap-pro) +::: + +## Installation +```bash +# With npm +npm install @tiptap/extension-collaboration-cursor + +# Or: With Yarn +yarn add @tiptap/extension-collaboration-cursor +``` + +## Settings +| Option | Type | Default | Description | +| -------- | ---- | ------- | ----------- | +| provider | | | | +| type | | | | + +## Commands +*None* + +## Keyboard shortcuts +*None* + +## Source code +[packages/extension-collaboration-cursor/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-collaboration-cursor/) + +## Usage +:::warning Public +The content of this editor is shared with other users. +::: + diff --git a/docs/src/docPages/api/extensions/collaboration.md b/docs/src/docPages/api/extensions/collaboration.md index c19acbb7..16f00fd6 100644 --- a/docs/src/docPages/api/extensions/collaboration.md +++ b/docs/src/docPages/api/extensions/collaboration.md @@ -1,8 +1,8 @@ # 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. -:::pro Premium Extension -Using this in production requires a **tiptap pro** license. [Read more](/license) +:::premium Premium Extension +Using this in production requires a **tiptap pro** license. [Read more](/tiptap-pro) ::: ## Installation diff --git a/docs/src/docPages/examples/collaborative-editing.md b/docs/src/docPages/examples/collaborative-editing.md index c085612e..e7755553 100644 --- a/docs/src/docPages/examples/collaborative-editing.md +++ b/docs/src/docPages/examples/collaborative-editing.md @@ -1,4 +1,9 @@ # Collaborative editing + +:::premium Requires Premium Extensions +Using this example in production requires a **tiptap pro** license. [Read more](/tiptap-pro) +::: + This example shows how you can use tiptap to let different users collaboratively work on the same text in real-time. It connects client with WebRTC and merges changes to the document (no matter where they come from) with the awesome library [Y.js](https://github.com/yjs/yjs) by Kevin Jahns. Be aware that in a real-world scenario you would probably add a server, which is also able to merge changes with Y.js. diff --git a/docs/src/docPages/guide/collaborative-editing.md b/docs/src/docPages/guide/collaborative-editing.md index 284ee236..053334b6 100644 --- a/docs/src/docPages/guide/collaborative-editing.md +++ b/docs/src/docPages/guide/collaborative-editing.md @@ -1,9 +1,12 @@ # Collaborative editing +:::premium Requires Premium Extensions +Using the collaborative editing in production requires a **tiptap pro** license. [Read more](/tiptap-pro) +::: + ## toc ## Introduction - Collaborative editing allows multiple users to work on the same text document in real-time. It’s a complex topic that you should be aware before adding it blindly to you app. No worries though, here is everything you need to know. ## Configure collaboration diff --git a/docs/src/docPages/tiptap-pro.md b/docs/src/docPages/tiptap-pro.md new file mode 100644 index 00000000..391c3559 --- /dev/null +++ b/docs/src/docPages/tiptap-pro.md @@ -0,0 +1,3 @@ +# tiptap pro + +[Sponsor us on GitHub](https://github.com/sponsors/ueberdosis) diff --git a/docs/src/layouts/App/index.vue b/docs/src/layouts/App/index.vue index eb5132d6..11b6f281 100644 --- a/docs/src/layouts/App/index.vue +++ b/docs/src/layouts/App/index.vue @@ -149,13 +149,13 @@