Merge branch 'main' of https://github.com/ueberdosis/tiptap into docs/remove-gridsome

# Conflicts:
#	docs/experiments/collaboration-annotation.md
#	docs/experiments/global-drag-handle.md
This commit is contained in:
Philipp Kühn
2021-09-17 23:45:04 +02:00
76 changed files with 179 additions and 184 deletions

View File

@@ -4,8 +4,6 @@ tableOfContents: true
# Commands
## toc
## Introduction
The editor provides a ton of commands to programmatically add or change content or alter the selection. If you want to build your own editor you definitely want to learn more about them.

View File

@@ -1,3 +1,5 @@
# createParagraphNear
<ContentMissing />
:::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)
:::

View File

@@ -1,3 +1,5 @@
# deleteNode
<ContentMissing />
:::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)
:::

View File

@@ -1,3 +1,5 @@
# deleteRange
<ContentMissing />
:::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)
:::

View File

@@ -1,3 +1,5 @@
# deleteSelection
<ContentMissing />
:::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)
:::

View File

@@ -1,3 +1,5 @@
# enter
<ContentMissing />
:::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)
:::

View File

@@ -1,3 +1,5 @@
# exitCode
<ContentMissing />
:::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)
:::

View File

@@ -1,3 +1,5 @@
# insertContentAt
<ContentMissing />
:::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)
:::

View File

@@ -1,3 +1,5 @@
# joinBackward
<ContentMissing />
:::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)
:::

View File

@@ -1,5 +1,7 @@
# joinForward
<ContentMissing />
:::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)
:::
https://prosemirror.net/docs/ref/#commands.joinForward

View File

@@ -1,3 +1,5 @@
# keyboardShortcut
<ContentMissing />
:::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)
:::

View File

@@ -1,3 +1,5 @@
# liftEmptyBlock
<ContentMissing />
:::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)
:::

View File

@@ -1,3 +1,5 @@
# liftListItem
<ContentMissing />
:::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)
:::

View File

@@ -1,3 +1,5 @@
# lift
<ContentMissing />
:::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)
:::

View File

@@ -1,3 +1,5 @@
# newlineInCode
<ContentMissing />
:::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)
:::

View File

@@ -1,3 +1,5 @@
# resetAttributes
<ContentMissing />
:::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)
:::

View File

@@ -1,3 +1,5 @@
# scrollIntoView
<ContentMissing />
:::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)
:::

View File

@@ -1,3 +1,5 @@
# selectNodeBackward
<ContentMissing />
:::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)
:::

View File

@@ -1,3 +1,5 @@
# selectNodeForward
<ContentMissing />
:::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)
:::

View File

@@ -1,3 +1,5 @@
# selectParentNode
<ContentMissing />
:::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)
:::

View File

@@ -1,3 +1,5 @@
# setMark
<ContentMissing />
:::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)
:::

View File

@@ -1,3 +1,5 @@
# setNodeSelection
<ContentMissing />
:::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)
:::

View File

@@ -1,3 +1,5 @@
# setNode
<ContentMissing />
:::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)
:::

View File

@@ -1,3 +1,5 @@
# sinkListItem
<ContentMissing />
:::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)
:::

View File

@@ -1,3 +1,5 @@
# splitBlock
<ContentMissing />
:::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)
:::

View File

@@ -1,3 +1,5 @@
# splitListItem
<ContentMissing />
:::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)
:::

View File

@@ -1,3 +1,5 @@
# toggleList
<ContentMissing />
:::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)
:::

View File

@@ -1,3 +1,5 @@
# toggleMark
<ContentMissing />
:::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)
:::

View File

@@ -1,3 +1,5 @@
# toggleNode
<ContentMissing />
:::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)
:::

View File

@@ -1,3 +1,5 @@
# toggleWrap
<ContentMissing />
:::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)
:::

View File

@@ -1,3 +1,5 @@
# undoInputRule
<ContentMissing />
:::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)
:::

View File

@@ -1,3 +1,5 @@
# unsetAllMarks
<ContentMissing />
:::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)
:::

View File

@@ -1,3 +1,5 @@
# unsetMark
<ContentMissing />
:::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)
:::

View File

@@ -1,3 +1,5 @@
# wrapInList
<ContentMissing />
:::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)
:::

View File

@@ -4,8 +4,6 @@ tableOfContents: true
# Editor
## toc
## 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.

View File

@@ -4,8 +4,6 @@ tableOfContents: true
# Events
## toc
## Introduction
The editor fires a few different events that you can hook into. Lets have a look at all the available events first:

View File

@@ -4,8 +4,6 @@ tableOfContents: true
# Extensions
## toc
## 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.

View File

@@ -4,8 +4,6 @@ tableOfContents: true
# Keyboard Shortcuts
## toc
## Introduction
tiptap comes with sensible keyboard shortcut defaults. Depending on what you want to use it for, youll probably want to change those keyboard shortcuts to your liking. Lets have a look at what we defined for you, and show you how to change it then!

View File

@@ -4,8 +4,6 @@ tableOfContents: true
# Marks
## toc
## Introduction
One or multiple marks can be applied to [nodes](/api/nodes), for example to add inline formatting like bold and italic, or other additional information.

View File

@@ -36,6 +36,13 @@ yarn add @tiptap/extension-link
This extension doesnt bind a specific keyboard shortcut. You would probably open your custom UI on `Mod-k` though.
:::
## Get the current value
Did you know that you can use [`getAttributes`](/api/editor#methods) to find out which attributes, for example which href, is currently set? Dont confuse it with a [command](/api/commands) (which changes the state), its just a method. Here is how that could look like:
```js
this.editor.getAttributes('link').href
```
## Source code
[packages/extension-link/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-link/)

View File

@@ -4,8 +4,6 @@ tableOfContents: true
# Nodes
## toc
## Introduction
If you think of the document as a tree, then nodes are just a type of content in that tree. Examples of nodes are paragraphs, headings, or code blocks. But nodes dont have to be blocks. They can also be rendered inline with the text, for example for **@mentions**.

View File

@@ -4,8 +4,6 @@ tableOfContents: true
# Schema
## toc
## 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.