This is a boring paragraph.
-
draggable item
+
Followed by a fancy draggable item.
Let’s finish with a boring paragraph.
`,
})
},
diff --git a/docs/src/docPages/api/commands.md b/docs/src/docPages/api/commands.md
index 08e319d9..66c210c8 100644
--- a/docs/src/docPages/api/commands.md
+++ b/docs/src/docPages/api/commands.md
@@ -262,8 +262,19 @@ addCommands() {
```
-->
-## Add custom commands
-All extensions can add additional commands (and most do), check out the specific [documentation for the provided nodes](/api/nodes), [marks](/api/marks), and [extensions](/api/extensions) to learn more about those.
+## Write your own commands
+All extensions can add additional commands (and most do), check out the specific [documentation for the provided nodes](/api/nodes), [marks](/api/marks), and [extensions](/api/extensions) to learn more about those. And of course, you can [add your custom extensions](/guide/custom-extensions) with custom commands aswell.
+
+But how do you write those commands? There’s a little bit to learn about that.
+
+:::pro Oops, this is work in progress
+A well-written documentation needs attention to detail, a great understanding of the project and time to write.
+
+Though tiptap is used by thousands of developers all around the world, it’s still a side project for us. Let’s change that and make open source our full-time job! With nearly 300 sponsors we are half way there already.
+
+Join them and become a sponsor! Enable us to put more time into open source and we’ll fill this page and keep it up to date for you.
+
+[Become a sponsor on GitHub →](https://github.com/sponsors/ueberdosis)
+:::
-Of course, you can [add your custom extensions](/guide/custom-extensions) with custom commands aswell.
diff --git a/docs/src/docPages/api/extensions.md b/docs/src/docPages/api/extensions.md
index f667f936..c736db5b 100644
--- a/docs/src/docPages/api/extensions.md
+++ b/docs/src/docPages/api/extensions.md
@@ -54,5 +54,5 @@ const editor = new Editor({
})
```
-Learn [more about custom extensions in our guide](/guide/extend-extensions).
+Learn [more about custom extensions in our guide](/guide/custom-extensions).
diff --git a/docs/src/docPages/guide/custom-extensions.md b/docs/src/docPages/guide/custom-extensions.md
index 1f4cf87e..45c4b9f6 100644
--- a/docs/src/docPages/guide/custom-extensions.md
+++ b/docs/src/docPages/guide/custom-extensions.md
@@ -3,9 +3,500 @@
## toc
## Introduction
-You can build your own extensions from scratch. Extend the provided `Node`, `Mark`, and `Extension` classes and pass an object with your configuration and custom code.
+One of the strength of tiptap is it’s extendability. You don’t depend on the provided extensions, it’s intended to extend the editor to your liking. With custom extensions you can add new content types and new functionalities, on top of what already exists or from scratch.
-Read the [overwrite & extend](/guide/extend-extensions) guide to learn more about all the things you can control.
+## Extend existing extensions
+Let’s say you want to change the keyboard shortcuts for the bullet list. You should start by looking at [the source code of the `BulletList` extension](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-bullet-list/src/bullet-list.ts) and find the part you would like to change. In that case, the keyboard shortcut, and just that.
+
+Every extension has an `extend()` method, which takes an object with everything you want to change or add to it. For the bespoken example, your code could like that:
+
+```js
+// 1. Import the extension
+import BulletList from '@tiptap/extension-bullet-list'
+
+// 2. Overwrite the keyboard shortcuts
+const CustomBulletList = BulletList.extend({
+ addKeyboardShortcuts() {
+ return {
+ 'Mod-l': () => this.editor.commands.toggleBulletList(),
+ }
+ },
+})
+
+// 3. Add the custom extension to your editor
+new Editor({
+ extensions: [
+ CustomBulletList(),
+ // …
+ ],
+})
+```
+
+The same applies to every aspect of an existing extension, except to the name. Let’s look at all the things that you can change through the extend method. We focus on one aspect in every example, but you can combine all those examples and change multiple aspects in one `extend()` call too.
+
+### Name
+The extension name is used in a whole lot of places and changing it isn’t too easy. If you want to change the name of an existing extension, we would recommended to copy the whole extension and change the name in all occurrences.
+
+The extension name is also part of the JSON. If you [store your content as JSON](/guide/output#option-1-json), you need to change the name there too.
+
+### Priority
+The priority defines the order in which extensions are registered. The default priority is `100`, that’s what most extension have. Extensions with a higher priority will be loaded earlier.
+
+```js
+import Link from '@tiptap/extension-link'
+
+const CustomLink = Link.extend({
+ priority: 1000,
+})
+```
+
+The order in which extensions are loaded influences two things:
+
+1. #### Plugin order
+ Plugins of extensions with a higher priority will run first.
+
+2. #### Schema order
+ The [`Link`](/api/marks/link) mark for example has a higher priority, which means it’ll be rendered as `