docs: use regular case for Tiptap

This commit is contained in:
Hans Pagel
2021-10-19 22:30:45 +02:00
parent 3fe97621e7
commit f45c8d0ca7
77 changed files with 203 additions and 203 deletions

View File

@@ -105,7 +105,7 @@ export default (value) => ({ tr, dispatch }) => {
}
```
If youre just wrapping another tiptap command, you dont need to check that, well do it for you.
If youre just wrapping another Tiptap command, you dont need to check that, well do it for you.
```js
addCommands() {
@@ -272,7 +272,7 @@ But how do you write those commands? Theres 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, its still a side project for us. Lets change that and make open source our full-time job! With nearly 300 sponsors we are half way there already.
Though Tiptap is used by thousands of developers all around the world, its still a side project for us. Lets 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 well fill this page and keep it up to date for you.

View File

@@ -1,5 +1,5 @@
# createParagraphNear
:::warning
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
:::

View File

@@ -1,5 +1,5 @@
# deleteNode
:::warning
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
:::

View File

@@ -1,5 +1,5 @@
# deleteRange
:::warning
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
:::

View File

@@ -1,5 +1,5 @@
# deleteSelection
:::warning
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
:::

View File

@@ -1,5 +1,5 @@
# enter
:::warning
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
:::

View File

@@ -1,5 +1,5 @@
# exitCode
:::warning
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
:::

View File

@@ -1,5 +1,5 @@
# insertContentAt
:::warning
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
:::

View File

@@ -1,5 +1,5 @@
# joinBackward
:::warning
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
:::

View File

@@ -1,7 +1,7 @@
# joinForward
:::warning
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
:::
https://prosemirror.net/docs/ref/#commands.joinForward

View File

@@ -1,5 +1,5 @@
# keyboardShortcut
:::warning
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
:::

View File

@@ -1,5 +1,5 @@
# liftEmptyBlock
:::warning
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
:::

View File

@@ -1,5 +1,5 @@
# liftListItem
:::warning
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
:::

View File

@@ -1,5 +1,5 @@
# lift
:::warning
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
:::

View File

@@ -1,5 +1,5 @@
# newlineInCode
:::warning
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
:::

View File

@@ -1,5 +1,5 @@
# resetAttributes
:::warning
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
:::

View File

@@ -1,5 +1,5 @@
# scrollIntoView
:::warning
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
:::

View File

@@ -1,5 +1,5 @@
# selectNodeBackward
:::warning
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
:::

View File

@@ -1,5 +1,5 @@
# selectNodeForward
:::warning
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
:::

View File

@@ -1,5 +1,5 @@
# selectParentNode
:::warning
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
:::

View File

@@ -1,5 +1,5 @@
# setMark
:::warning
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
:::

View File

@@ -1,5 +1,5 @@
# setNodeSelection
:::warning
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
:::

View File

@@ -1,5 +1,5 @@
# setNode
:::warning
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
:::

View File

@@ -1,5 +1,5 @@
# sinkListItem
:::warning
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
:::

View File

@@ -1,5 +1,5 @@
# splitBlock
:::warning
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
:::

View File

@@ -1,5 +1,5 @@
# splitListItem
:::warning
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
:::

View File

@@ -1,5 +1,5 @@
# toggleList
:::warning
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
:::

View File

@@ -1,5 +1,5 @@
# toggleMark
:::warning
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
:::

View File

@@ -1,5 +1,5 @@
# toggleNode
:::warning
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
:::

View File

@@ -1,5 +1,5 @@
# toggleWrap
:::warning
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
:::

View File

@@ -1,5 +1,5 @@
# undoInputRule
:::warning
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
:::

View File

@@ -1,5 +1,5 @@
# unsetAllMarks
:::warning
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
:::

View File

@@ -1,5 +1,5 @@
# unsetMark
:::warning
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
:::

View File

@@ -1,5 +1,5 @@
# wrapInList
:::warning
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
Oops, we didnt find time to fill this page. Writing 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, its still a side project for us. Lets change that and make open source our full-time job! [Become a sponsor!](https://github.com/sponsors/ueberdosis)
:::

View File

@@ -5,7 +5,7 @@ tableOfContents: true
# Editor
## Introduction
This class is a central building block of tiptap. It does most of the heavy lifting of creating a working [ProseMirror](https://ProseMirror.net/) editor such as creating the [`EditorView`](https://ProseMirror.net/docs/ref/#view.EditorView), setting the initial [`EditorState`](https://ProseMirror.net/docs/ref/#state.Editor_State) and so on.
This class is a central building block of Tiptap. It does most of the heavy lifting of creating a working [ProseMirror](https://ProseMirror.net/) editor such as creating the [`EditorView`](https://ProseMirror.net/docs/ref/#view.EditorView), setting the initial [`EditorState`](https://ProseMirror.net/docs/ref/#state.Editor_State) and so on.
## Methods
The editor instance will provide a bunch of public methods. Methods are regular functions and can return anything. Theyll help you to work with the editor.
@@ -151,7 +151,7 @@ editor.isEmpty
## Settings
### element
The `element` specifies the HTML element the editor will be binded too. The following code will integrate tiptap with an element with the `.element` class:
The `element` specifies the HTML element the editor will be binded too. The following code will integrate Tiptap with an element with the `.element` class:
```js
import { Editor } from '@tiptap/core'
@@ -259,7 +259,7 @@ new Editor({
```
### enableInputRules
By default, tiptap enables all [input rules](/guide/custom-extensions/#input-rules). With `enableInputRules` you can disable that.
By default, Tiptap enables all [input rules](/guide/custom-extensions/#input-rules). With `enableInputRules` you can disable that.
```js
import { Editor } from '@tiptap/core'
@@ -275,7 +275,7 @@ new Editor({
```
### enablePasteRules
By default, tiptap enables all [paste rules](/guide/custom-extensions/#paste-rules). With `enablePasteRules` you can disable that.
By default, Tiptap enables all [paste rules](/guide/custom-extensions/#paste-rules). With `enablePasteRules` you can disable that.
```js
import { Editor } from '@tiptap/core'
@@ -291,7 +291,7 @@ new Editor({
```
### injectCSS
By default, tiptap injects [a little bit of CSS](https://github.com/ueberdosis/tiptap/tree/main/packages/core/src/style.ts). With `injectCSS` you can disable that.
By default, Tiptap injects [a little bit of CSS](https://github.com/ueberdosis/tiptap/tree/main/packages/core/src/style.ts). With `injectCSS` you can disable that.
```js
import { Editor } from '@tiptap/core'

View File

@@ -5,7 +5,7 @@ tableOfContents: true
# Extensions
## Introduction
Extensions add new capabilities to tiptap and youll read the word extension here very often. Actually, there are literal Extensions. Those cant add to the schema, but can add functionality or change the behaviour of the editor.
Extensions add new capabilities to Tiptap and youll read the word extension here very often. Actually, there are literal Extensions. Those cant add to the schema, but can add functionality or change the behaviour of the editor.
There are also some extensions with more capabilities. We call them [nodes](/api/nodes) and [marks](/api/marks) which can render content in the editor.
@@ -29,14 +29,14 @@ There are also some extensions with more capabilities. We call them [nodes](/api
You dont have to use it, but we prepared a `@tiptap/starter-kit` which includes the most common extensions. Read more about [`StarterKit`](/guide/configuration#default-extensions).
## How extensions work
Although tiptap tries to hide most of the complexity of ProseMirror, its built on top of its APIs and we recommend you to read through the [ProseMirror Guide](https://ProseMirror.net/docs/guide/) for advanced usage. Youll have a better understanding of how everything works under the hood and get more familiar with many terms and jargon used by tiptap.
Although Tiptap tries to hide most of the complexity of ProseMirror, its built on top of its APIs and we recommend you to read through the [ProseMirror Guide](https://ProseMirror.net/docs/guide/) for advanced usage. Youll have a better understanding of how everything works under the hood and get more familiar with many terms and jargon used by Tiptap.
Existing [nodes](/api/nodes), [marks](/api/marks) and [extensions](/api/extensions) can give you a good impression on how to approach your own extensions. To make it easier to switch between the documentation and the source code, we linked to the file on GitHub from every single extension documentation page.
We recommend to start with customizing existing extensions first, and create your own extensions with the gained knowledge later. Thats why all the below examples extend existing extensions, but all examples will work on newly created extensions aswell.
## Create a new extension
Youre free to create your own extensions for tiptap. Here is the boilerplate code thats need to create and register your own extension:
Youre free to create your own extensions for Tiptap. Here is the boilerplate code thats need to create and register your own extension:
```js
import { Extension } from '@tiptap/core'

View File

@@ -9,7 +9,7 @@ icon: drag-drop-line
This extension loads the [ProseMirror Dropcursor plugin](https://github.com/ProseMirror/prosemirror-dropcursor) by Marijn Haverbeke, which shows a cursor at the drop position when something is dragged into the editor.
Note that tiptap is headless, but the dropcursor needs CSS for its appearance. There are settings for the color and width, and youre free to add a custom CSS class.
Note that Tiptap is headless, but the dropcursor needs CSS for its appearance. There are settings for the color and width, and youre free to add a custom CSS class.
## Installation
```bash

View File

@@ -9,7 +9,7 @@ icon: space
This extension loads the [ProseMirror Gapcursor plugin](https://github.com/ProseMirror/prosemirror-gapcursor) by Marijn Haverbeke, which adds a gap for the cursor in places that dont allow regular selection. For example, after a table at the end of a document.
Note that tiptap is headless, but the gapcursor needs CSS for its appearance. The [default CSS](https://github.com/ueberdosis/tiptap/tree/main/packages/core/src/style.ts) is loaded through the Editor class.
Note that Tiptap is headless, but the gapcursor needs CSS for its appearance. The [default CSS](https://github.com/ueberdosis/tiptap/tree/main/packages/core/src/style.ts) is loaded through the Editor class.
## Installation
```bash

View File

@@ -7,7 +7,7 @@ icon: stack-line
[![Version](https://img.shields.io/npm/v/@tiptap/starter-kit.svg?label=version)](https://www.npmjs.com/package/@tiptap/starter-kit)
[![Downloads](https://img.shields.io/npm/dm/@tiptap/starter-kit.svg)](https://npmcharts.com/compare/@tiptap/starter-kit?minimal=true)
The `StarterKit` is a collection of the most popular tiptap extensions. If youre just getting started, this extension is for you.
The `StarterKit` is a collection of the most popular Tiptap extensions. If youre just getting started, this extension is for you.
## Installation
```bash

View File

@@ -1,5 +1,5 @@
# Introduction
tiptap is a friendly wrapper around [ProseMirror](https://ProseMirror.net). Although tiptap tries to hide most of the complexity of ProseMirror, its built on top of its APIs and we recommend you to read through the [ProseMirror Guide](https://ProseMirror.net/docs/guide/) for advanced usage.
tiptap is a friendly wrapper around [ProseMirror](https://ProseMirror.net). Although Tiptap tries to hide most of the complexity of ProseMirror, its built on top of its APIs and we recommend you to read through the [ProseMirror Guide](https://ProseMirror.net/docs/guide/) for advanced usage.
### Structure
ProseMirror works with a strict [Schema](/api/schema), which defines the allowed structure of a document. A document is a tree of headings, paragraphs and others elements, so called nodes. Marks can be attached to a node, e. g. to emphasize part of it. [Commands](/api/commands) change that document programmatically.

View File

@@ -32,7 +32,7 @@ If you think of the document as a tree, then nodes are just a type of content in
| [Text](/api/nodes/text) | Included | [GitHub](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-text/) |
## Create a new node
Youre free to create your own nodes for tiptap. Here is the boilerplate code thats need to create and register your own node:
Youre free to create your own nodes for Tiptap. Here is the boilerplate code thats need to create and register your own node:
```js
import { Node } from '@tiptap/core'

View File

@@ -7,7 +7,7 @@ icon: file-line
[![Version](https://img.shields.io/npm/v/@tiptap/extension-document.svg?label=version)](https://www.npmjs.com/package/@tiptap/extension-document)
[![Downloads](https://img.shields.io/npm/dm/@tiptap/extension-document.svg)](https://npmcharts.com/compare/@tiptap/extension-document?minimal=true)
**The `Document` extension is required**, no matter what you build with tiptap. Its a so called “topNode”, a node thats the home to all other nodes. Think of it like the `<body>` tag for your document.
**The `Document` extension is required**, no matter what you build with Tiptap. Its a so called “topNode”, a node thats the home to all other nodes. Think of it like the `<body>` tag for your document.
The node is very tiny though. It defines a name of the node (`doc`), is configured to be a top node (`topNode: true`) and that it can contain multiple other nodes (`block+`). Thats all. But have a look yourself:

View File

@@ -11,7 +11,7 @@ There is no extension or example yet, but its definitely on our list to build
If you want to give it a shot yourself, you could start altering the [`Mention`](/api/nodes/mention) node. This uses the [`Suggestion`](/api/utilities/suggestion) utility, which should help with an autocomplete and such things.
:::pro Fund the development ♥
We need your support to maintain, update, support and develop tiptap. If youre waiting for this extension, [become a sponsor and fund our work](/sponsor).
We need your support to maintain, update, support and develop Tiptap. If youre waiting for this extension, [become a sponsor and fund our work](/sponsor).
:::
## Bring your own emoji picker

View File

@@ -6,7 +6,7 @@ icon: hashtag
# Hashtag
:::pro Fund the development ♥
We need your support to maintain, update, support and develop tiptap. If youre waiting for this extension, [become a sponsor and fund our work](/sponsor).
We need your support to maintain, update, support and develop Tiptap. If youre waiting for this extension, [become a sponsor and fund our work](/sponsor).
:::
TODO

View File

@@ -38,7 +38,7 @@ Image.configure({
### inline
Renders the image node inline, for example in a paragraph tag: `<p><img src="spacer.gif"></p>`. By default images are on the same level as paragraphs.
It totally depends on what kind of editing experience youd like to have, but can be useful if you (for example) migrate from Quill to tiptap.
It totally depends on what kind of editing experience youd like to have, but can be useful if you (for example) migrate from Quill to Tiptap.
Default: `false`

View File

@@ -5,11 +5,11 @@ tableOfContents: true
# Schema
## Introduction
Unlike many other editors, tiptap is based on a [schema](https://prosemirror.net/docs/guide/#schema) that defines how your content is structured. That enables you to define the kind of nodes that may occur in the document, its attributes and the way they can be nested.
Unlike many other editors, Tiptap is based on a [schema](https://prosemirror.net/docs/guide/#schema) that defines how your content is structured. That enables you to define the kind of nodes that may occur in the document, its attributes and the way they can be nested.
This schema is *very* strict. You cant use any HTML element or attribute that is not defined in your schema.
Let me give you one example: If you paste something like `This is <strong>important</strong>` into tiptap, but dont have any extension that handles `strong` tags, youll only see `This is important` without the strong tags.
Let me give you one example: If you paste something like `This is <strong>important</strong>` into Tiptap, but dont have any extension that handles `strong` tags, youll only see `This is important` without the strong tags.
## How a schema looks like
When youll work with the provided extensions only, you dont have to care that much about the schema. If youre building your own extensions, its probably helpful to understand how the schema works. Lets look at the most simple schema for a typical ProseMirror editor:
@@ -36,10 +36,10 @@ When youll work with the provided extensions only, you dont have to care t
We register three nodes here. `doc`, `paragraph` and `text`. `doc` is the root node which allows one or more block nodes as children (`content: 'block+'`). Since `paragraph` is in the group of block nodes (`group: 'block'`) our document can only contain paragraphs. Our paragraphs allow zero or more inline nodes as children (`content: 'inline*'`) so there can only be `text` in it. `parseDOM` defines how a node can be parsed from pasted HTML. `toDOM` defines how it will be rendered in the DOM.
In tiptap every node, mark and extension is living in its own file. This allows us to split the logic. Under the hood the whole schema will be merged together:
In Tiptap every node, mark and extension is living in its own file. This allows us to split the logic. Under the hood the whole schema will be merged together:
```js
// the tiptap schema API
// the Tiptap schema API
import { Node } from '@tiptap/core'
const Document = Node.create({
@@ -294,7 +294,7 @@ Mark.create({
```
## Get the underlying ProseMirror schema
There are a few use cases where you need to work with the underlying schema. Youll need that if youre using the tiptap collaborative text editing features or if you want to manually render your content as HTML.
There are a few use cases where you need to work with the underlying schema. Youll need that if youre using the Tiptap collaborative text editing features or if you want to manually render your content as HTML.
### Option 1: With an Editor
If you need this on the client side and need an editor instance anyway, its available through the editor: