Merge branch 'main' of https://github.com/ueberdosis/tiptap-next into main
# Conflicts: # docs/src/docPages/api/commands.md
This commit is contained in:
@@ -69,32 +69,29 @@ commands.try([
|
||||
Have a look at all of the core commands listed below. They should give you a good first impression of what’s possible.
|
||||
|
||||
### Content
|
||||
| Command | Description |
|
||||
| ---------------- | ----------------------------------------------------------- |
|
||||
| .clearContent() | Clear the whole document. |
|
||||
| .insertgetHTML() | Insert a string of HTML at the currently selected position. |
|
||||
| .insertText() | Insert a string of text at the currently selected position. |
|
||||
| .insertHTML() | |
|
||||
| .setContent() | Replace the whole document with new content. |
|
||||
| Command | Description |
|
||||
| --------------- | ------------------------------------------------ |
|
||||
| .clearContent() | Clear the whole document. |
|
||||
| .insertHTML() | Insert a string of HTML at the current position. |
|
||||
| .insertText() | Insert a string of text at the current position. |
|
||||
| .setContent() | Replace the whole document with new content. |
|
||||
|
||||
### Nodes & Marks
|
||||
| Command | Description |
|
||||
| ----------------------- | ------------------------------------------ |
|
||||
| .clearNodes() | |
|
||||
| .removeMark() | |
|
||||
| .removeMark() | Remove a mark in the current selection. |
|
||||
| .removeMarks() | |
|
||||
| .removeMarks() | Remove all marks in the current selection. |
|
||||
| .resetNodeAttributes() | |
|
||||
| .selectParentNode() | Select the parent node. |
|
||||
| .setBlockType() | Replace a given range with a node. |
|
||||
| .updateNoteAttributes() | |
|
||||
| .splitBlock() | Forks a new node from an existing node. |
|
||||
| .toggleBlockType() | Toggle a node with another node. |
|
||||
| .toggleMark() | |
|
||||
| .toggleMark() | Toggle a mark on and off. |
|
||||
| .toggleWrap() | |
|
||||
| .updateMarkAttributes() | Update a mark with new attributes. |
|
||||
| Command | Description |
|
||||
| ----------------------- | --------------------------------------------------------- |
|
||||
| .clearNodes() | Normalize nodes to a simple paragraph. |
|
||||
| .removeMark() | Remove a mark in the current selection. |
|
||||
| .removeMarks() | Remove all marks in the current selection. |
|
||||
| .removeMarks() | Remove all marks in the current selection. |
|
||||
| .resetNodeAttributes() | Resets all node attributes to the default value. |
|
||||
| .selectParentNode() | Select the parent node. |
|
||||
| .setBlockType() | Replace a given range with a node. |
|
||||
| .splitBlock() | Forks a new node from an existing node. |
|
||||
| .toggleBlockType() | Toggle a node with another node. |
|
||||
| .toggleMark() | Toggle a mark on and off. |
|
||||
| .toggleWrap() | Wraps nodes in another node, or removes an existing wrap. |
|
||||
| .updateMarkAttributes() | Update a mark with new attributes. |
|
||||
| .updateNodeAttributes() | Update attributes of a node. |
|
||||
|
||||
### Lists
|
||||
| Command | Description |
|
||||
@@ -102,8 +99,8 @@ Have a look at all of the core commands listed below. They should give you a goo
|
||||
| .liftListItem() | Lift the list item into a wrapping list. |
|
||||
| .sinkListItem() | Sink the list item down into an inner list. |
|
||||
| .splitListItem() | Splits a textblock of a list item into two list items. |
|
||||
| .toggleList() | Toggle between different list styles. |
|
||||
| .wrapInList() | |
|
||||
| .toggleList() | Toggle between different list types. |
|
||||
| .wrapInList() | Wrap a node in a list. |
|
||||
|
||||
### Selection
|
||||
| Command | Description |
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
# Collaboration Cursor
|
||||
This extension adds information about all connected users (like their name and a specified color), their current cursor position and their text selection (if there’s one).
|
||||
|
||||
:::premium Premium Extension
|
||||
Using this in production requires a **tiptap pro** license. [Read more](/sponsor)
|
||||
Open this page in multiple browser windows to test it.
|
||||
|
||||
:::premium 💖 Pro Extension
|
||||
We kindly ask you to sponsor us, before using this extension in production. [Read more](/sponsor)
|
||||
:::
|
||||
|
||||
::: warning Use with Collaboration
|
||||
This extension requires the [`Collaboration`](/api/extensions/collaboration) extension.
|
||||
:::
|
||||
|
||||
## Installation
|
||||
@@ -31,4 +38,4 @@ yarn add @tiptap/extension-collaboration-cursor
|
||||
:::warning Public
|
||||
The content of this editor is shared with other users.
|
||||
:::
|
||||
<demo name="Extensions/CollaborationCursor" highlight="" />
|
||||
<demo name="Extensions/CollaborationCursor" highlight="11,48-52" />
|
||||
|
||||
@@ -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.
|
||||
|
||||
:::premium Premium Extension
|
||||
Using this in production requires a **tiptap pro** license. [Read more](/sponsor)
|
||||
:::premium Pro Extension
|
||||
We kindly ask you to sponsor us, before using this extension in production. [Read more](/sponsor)
|
||||
:::
|
||||
|
||||
## Installation
|
||||
@@ -33,4 +33,4 @@ yarn add @tiptap/extension-collaboration yjs y-webrtc
|
||||
:::warning Public
|
||||
The content of this editor is shared with other users.
|
||||
:::
|
||||
<demo name="Extensions/Collaboration" highlight="" />
|
||||
<demo name="Extensions/Collaboration" highlight="10-12,30-32,43-46,53" />
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# Dropcursor
|
||||
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 over the editor.
|
||||
|
||||
Note that tiptap is renderless, but the dropcursor needs CSS for its appearance. The default CSS is added to the usage example below.
|
||||
|
||||
## Installation
|
||||
```bash
|
||||
@@ -9,17 +12,8 @@ npm install @tiptap/extension-dropcursor
|
||||
yarn add @tiptap/extension-dropcursor
|
||||
```
|
||||
|
||||
## Settings
|
||||
*None*
|
||||
|
||||
## Commands
|
||||
*None*
|
||||
|
||||
## Keyboard shortcuts
|
||||
*None*
|
||||
|
||||
## Source code
|
||||
[packages/extension-dropcursor/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-dropcursor/)
|
||||
|
||||
## Usage
|
||||
<demo name="Extensions/Dropcursor" highlight="" />
|
||||
<demo name="Extensions/Dropcursor" highlight="12,33" />
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# Focus
|
||||
The Focus extension adds a CSS class to focused nodes. By default it adds `.has-class`, but you can change that.
|
||||
|
||||
Note that it’s only a class, the styling is totally up to you. The usage example below has some CSS for that class.
|
||||
|
||||
## Installation
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user