From 277867243a2f557f0d54441b0fcdb9bf97c5b802 Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Wed, 11 Nov 2020 16:13:08 +0100 Subject: [PATCH 1/4] fix broken link --- docs/src/docPages/{ => overview}/feedback.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/src/docPages/{ => overview}/feedback.md (100%) diff --git a/docs/src/docPages/feedback.md b/docs/src/docPages/overview/feedback.md similarity index 100% rename from docs/src/docPages/feedback.md rename to docs/src/docPages/overview/feedback.md From d57c0d89323db6ed4890851fa2763f9349bdb104 Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Thu, 12 Nov 2020 11:58:15 +0100 Subject: [PATCH 2/4] style --- docs/src/docPages/overview/feedback.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/docPages/overview/feedback.md b/docs/src/docPages/overview/feedback.md index f35a28cc4..8844146e0 100644 --- a/docs/src/docPages/overview/feedback.md +++ b/docs/src/docPages/overview/feedback.md @@ -4,4 +4,4 @@ We’re looking for your feedback to improve tiptap 2 before the first public re * Create issues on GitHub! [Link](https://github.com/ueberdosis/tiptap-next/issues) * Send an email! [humans@tiptap.dev](mailto:humans@tiptap.dev) -* Follow us on Twitter! [@hanspagel](https://twitter.com/hanspagel) [@_philippkuehn](https://twitter.com/_philippkuehn) [@_ueberdosis](https://twitter.com/_ueberdosis) +* Follow us on Twitter! [@hanspagel](https://twitter.com/hanspagel), [@_philippkuehn](https://twitter.com/_philippkuehn), or [@_ueberdosis](https://twitter.com/_ueberdosis) From 956f2b184a2fda11d1ffb38832745447060103fb Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Thu, 12 Nov 2020 13:20:22 +0100 Subject: [PATCH 3/4] ad link to v-model example --- docs/src/demos/Examples/FullEditor/index.vue | 2 +- docs/src/links.yaml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/src/demos/Examples/FullEditor/index.vue b/docs/src/demos/Examples/FullEditor/index.vue index 97d0b087d..31e4830cc 100644 --- a/docs/src/demos/Examples/FullEditor/index.vue +++ b/docs/src/demos/Examples/FullEditor/index.vue @@ -17,7 +17,7 @@ export default { data() { return { - content: '

full editor

', + content: '

A Vue.js wrapper component for tiptap to use v-model.

', } }, } diff --git a/docs/src/links.yaml b/docs/src/links.yaml index 6afa58b13..07c2924fc 100644 --- a/docs/src/links.yaml +++ b/docs/src/links.yaml @@ -31,6 +31,9 @@ link: /examples/minimalist - title: Export HTML or JSON link: /examples/export-html-or-json + - title: Full Editor + link: /examples/full-editor + draft: true - title: Feedback link: /overview/feedback From 746867761431be0157108334fe7e90d7e9a877cb Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Thu, 12 Nov 2020 15:31:44 +0100 Subject: [PATCH 4/4] add redirects (easypeasy) --- docs/src/docPages/api/commands.md | 6 +- docs/src/docPages/examples.md | 3 - docs/src/docPages/open.md | 26 ----- docs/src/docPages/open/2020-08.md | 6 ++ docs/src/docPages/open/2020-09.md | 5 + docs/src/docPages/open/2020-10.md | 6 ++ docs/src/docPages/overview/contributing.md | 10 ++ docs/src/docPages/overview/upgrade-guide.md | 27 +++++- docs/src/layouts/App/index.vue | 100 +++++--------------- docs/src/layouts/App/style.scss | 18 +++- docs/src/links.yaml | 17 +++- 11 files changed, 105 insertions(+), 119 deletions(-) delete mode 100644 docs/src/docPages/examples.md delete mode 100644 docs/src/docPages/open.md create mode 100644 docs/src/docPages/open/2020-08.md create mode 100644 docs/src/docPages/open/2020-09.md create mode 100644 docs/src/docPages/open/2020-10.md diff --git a/docs/src/docPages/api/commands.md b/docs/src/docPages/api/commands.md index f105b00ef..49787cec5 100644 --- a/docs/src/docPages/api/commands.md +++ b/docs/src/docPages/api/commands.md @@ -15,15 +15,15 @@ editor.bold() While that’s perfectly fine and does make the selected bold, you’d likely want to change multiple commands in one run. Let’s have a look at how that works. ### Chain commands -Most commands can be executed combined to one call. First of all, that’s shorter than separate function call in most cases. Here is an example to make the selected text bold: +Most commands can be combined to one call. That’s shorter than separate function calls in most cases. Here is an example to make the selected text bold: ```js editor.chain().bold().focus().run() ``` -The `.chain()` is required to start a new chain and the `.run()` is needed to actually execute all the commands in between. Between those two functions, this example combines to different commands. +The `.chain()` is required to start a new chain and the `.run()` is needed to actually execute all the commands in between. -When a user clicks on a button outside of the content, the editor isn’t in focus anymore. That’s why you probably want to add a `.focus()` call to most of your commands, that brings back the focus to the editor and the user can continue to type. +In the example above two different commands are executed at once. When a user clicks on a button outside of the content, the editor isn’t in focus anymore. That’s why you probably want to add a `.focus()` call to most of your commands. It brings back the focus to the editor, so the user can continue to type. All chained commands are kind of queued up. They are combined to one single transaction. That means, the content is only updated once, also the `update` event is only triggered once. diff --git a/docs/src/docPages/examples.md b/docs/src/docPages/examples.md deleted file mode 100644 index 4b61ec780..000000000 --- a/docs/src/docPages/examples.md +++ /dev/null @@ -1,3 +0,0 @@ -# Examples - -TODO: This page should redirect to [/examples/basic](/examples/basic). diff --git a/docs/src/docPages/open.md b/docs/src/docPages/open.md deleted file mode 100644 index b5d7cae32..000000000 --- a/docs/src/docPages/open.md +++ /dev/null @@ -1,26 +0,0 @@ -# Monthly reports - -## October 2020 -* Writing extensions for tiptap 2 -* 25 sponsors, $423/month -* 102 hours, $7,140 development costs (at $70/hour) -* Sponsored @calebporzio with $99 -* **Total -$6,816** - -## September 2020 -* Developing the API of tiptap 2, writing the documentation -* 125 hours, $8,750 development costs (at $70/hour) -* Sponsored @calebporzio with $99 -* **Total -$8,849** - -## August 2020 -* Setting up tiptap 2 -* 56 hours, $3,920 development costs (at $70/hour) -* Sponsored @calebporzio with $99 -* **Total -$4,019** - -## All time - -* **Total -$19.684** - - diff --git a/docs/src/docPages/open/2020-08.md b/docs/src/docPages/open/2020-08.md new file mode 100644 index 000000000..6e6fa2777 --- /dev/null +++ b/docs/src/docPages/open/2020-08.md @@ -0,0 +1,6 @@ +# August 2020 +* Setting up tiptap 2 +* 56 hours, $3,920 development costs (at $70/hour) +* Sponsored @calebporzio with $99 +* **Total -$4,019** + diff --git a/docs/src/docPages/open/2020-09.md b/docs/src/docPages/open/2020-09.md new file mode 100644 index 000000000..86c06114d --- /dev/null +++ b/docs/src/docPages/open/2020-09.md @@ -0,0 +1,5 @@ +# September 2020 +* Developing the API of tiptap 2, writing the documentation +* 125 hours, $8,750 development costs (at $70/hour) +* Sponsored @calebporzio with $99 +* **Total -$8,849** diff --git a/docs/src/docPages/open/2020-10.md b/docs/src/docPages/open/2020-10.md new file mode 100644 index 000000000..5eeb8f2e2 --- /dev/null +++ b/docs/src/docPages/open/2020-10.md @@ -0,0 +1,6 @@ +# October 2020 +* Writing extensions for tiptap 2 +* 25 sponsors, $423/month +* 102 hours, $7,140 development costs (at $70/hour) +* Sponsored @calebporzio with $99 +* **Total -$6,816** diff --git a/docs/src/docPages/overview/contributing.md b/docs/src/docPages/overview/contributing.md index f28771ea2..05836280b 100644 --- a/docs/src/docPages/overview/contributing.md +++ b/docs/src/docPages/overview/contributing.md @@ -12,10 +12,20 @@ tiptap would be nothing without its lively community. Contributions have always * New extensions, which don’t require changes to the core or other core extensions * Well explained, non-breaking changes to the core +## Set up the development environment +It’s not too hard to tinker around with the offical repository. You’ll need [Git](https://github.com/git-guides/install-git), [Node](https://nodejs.org/en/download/) and [Yarn](https://classic.yarnpkg.com/en/docs/install/#mac-stable) installed. Here is what you need to do then: + +1. Copy the code to your local machine: `$ git clone git@github.com:ueberdosis/tiptap-next.git` +2. Install dependencies: `$ yarn install` +3. Start the development environment: `$ yarn start` +4. Open http://localhost:3000 in your favorite browser. +5. Start playing around! + ## Our code style There is an eslint config that ensures a consistent code style. To check for errors, run `$ yarn run lint`. That’ll be checked when you send a pull request, too. Make sure it’s passing, before sending a pull request. ## Testing for errors Your pull request will automatically execute all our existing tests. Make sure that they all pass, before sending a pull request. Run all tests locally with `$ yarn run test` or run single tests (e. g. when writing new ones) with `$ yarn run test:open`. +## Futher questions Any further questions? Create a new issue or discussion in the repository. We’ll get back to you. diff --git a/docs/src/docPages/overview/upgrade-guide.md b/docs/src/docPages/overview/upgrade-guide.md index 7f3115f9b..ca012d1df 100644 --- a/docs/src/docPages/overview/upgrade-guide.md +++ b/docs/src/docPages/overview/upgrade-guide.md @@ -15,7 +15,9 @@ Yes, it’s tedious work to upgrade your favorite text editor to a new API, but The new API will look pretty familiar too you, but there are a ton of changes though. To make the upgrade a little bit easier, here is everything you need to know: ### Upgrade to Vue.js 3 -… +:::warning Work in progress +We’re waiting for Gridsome to be compatible with Vue.js 3. +::: ### Explicitly register the Document, Text and Paragraph extensions tiptap 1 tried to hide a few required extensions from you with the default setting `useBuiltInExtensions: true`. That setting has been removed and you’re required to import all extensions. Be sure to explicitly import at least the [Document](/api/nodes/document), [Paragraph](/api/nodes/paragraph) and [Text](/api/nodes/text) extensions. @@ -71,7 +73,7 @@ const CustomExtension = createNode({ }) ``` -Don’t forget to call `create()` in the end! Read more about [all the nifty details building custom extensions](/guide/build-custom-extensions) in our guide. +Read more about [all the nifty details building custom extensions](/guide/build-custom-extensions) in our guide. ### Renamed API methods [We renamed a lot of commands](/api/commands), hopefully you can migrate to the new API with search & replace. Here is a list of what changed: @@ -81,12 +83,29 @@ Don’t forget to call `create()` in the end! Read more about [all the nifty det | ~~`…`~~ | `…` | ### Commands can be chained now +Most commands can be combined to one call now. That’s shorter than separate function calls in most cases. Here is an example to make the selected text bold: -… +```js +editor.chain().bold().focus().run() +``` + +The `.chain()` is required to start a new chain and the `.run()` is needed to actually execute all the commands in between. Read more about [the new tiptap commands](/api/commands) in our API documentation. ### .focus() isn’t called on every command anymore -We tried to hide the `.focus()` command from you with tiptap 1 and executed that on every other command. That led to issues in specific use cases, where you want to run a command, but don’t want to focus the editor. With tiptap 2.x you have to explicitly call the `focus()` and you probably want to do that in a lot of places. Here is an example: +We tried to hide the `.focus()` command from you with tiptap 1 and executed that on every command. That led to issues in specific use cases, where you want to run a command, but don’t want to focus the editor. + +With tiptap 2.x you have to explicitly call the `focus()` and you probably want to do that in a lot of places. Here is an example: ```js editor.chain().focus().bold().run() ``` + +### Collaborative editing +The reference implementation for collaborative editing uses Y.js now. That’s a whole different thing. You still can use the tiptap 1 extension, but it’s up to you to adapt it to the new extension API. If you’ve done this, don’t forget to share it with us so we can link to it from here! + +Read more about [the new collaborative editing experience](/guide/collaborative-editing) in our guide. + +### Become a sponsor +tiptap wouldn’t exist without the funding of its community. If you fell in love with tiptap, don’t forget to [become a sponsor](/sponsor) and make the [maintenance, development and support](/open) sustainable. + +In exchange, we’ll take you into our hearts, invite you to private repositories, add a `sponsor 💖` label to your issues and pull requests and more. diff --git a/docs/src/layouts/App/index.vue b/docs/src/layouts/App/index.vue index a82252beb..1ccb734f1 100644 --- a/docs/src/layouts/App/index.vue +++ b/docs/src/layouts/App/index.vue @@ -1,78 +1,4 @@