docs: remove most of the tables from the content (to improve the searchability)
This commit is contained in:
@@ -158,61 +158,61 @@ Have a look at all of the core commands listed below. They should give you a goo
|
||||
### Content
|
||||
| Command | Description | Links |
|
||||
| ------------------ | -------------------------------------------------------- | --------------------------------------- |
|
||||
| .clearContent() | Clear the whole document. | [More](/api/commands/clear-content) |
|
||||
| .insertContent() | Insert a node or string of HTML at the current position. | [More](/api/commands/insert-content) |
|
||||
| .insertContentAt() | Insert a node or string of HTML at a specific position. | [More](/api/commands/insert-content-at) |
|
||||
| .setContent() | Replace the whole document with new content. | [More](/api/commands/set-content) |
|
||||
| clearContent() | Clear the whole document. | [More](/api/commands/clear-content) |
|
||||
| insertContent() | Insert a node or string of HTML at the current position. | [More](/api/commands/insert-content) |
|
||||
| insertContentAt() | Insert a node or string of HTML at a specific position. | [More](/api/commands/insert-content-at) |
|
||||
| setContent() | Replace the whole document with new content. | [More](/api/commands/set-content) |
|
||||
|
||||
### Nodes & Marks
|
||||
| Command | Description | Links |
|
||||
| ----------------------- | --------------------------------------------------------- | ------------------------------------ |
|
||||
| .clearNodes() | Normalize nodes to a simple paragraph. | [More](/api/commands/clear-nodes) |
|
||||
| .createParagraphNear() | Create a paragraph nearby. | [More](/api/commands/create-paragraph-near) |
|
||||
| .deleteNode() | Delete a node. | [More](/api/commands/delete-node) |
|
||||
| .extendMarkRange() | Extends the text selection to the current mark. | [More](/api/commands/extend-mark-range) |
|
||||
| .exitCode() | Exit from a code block. | [More](/api/commands/exit-code) |
|
||||
| .joinBackward() | Join two nodes backward. | [More](/api/commands/join-backward) |
|
||||
| .joinForward() | Join two nodes forward. | [More](/api/commands/join-forward) |
|
||||
| .lift() | Removes an existing wrap. | [More](/api/commands/lift) |
|
||||
| .liftEmptyBlock() | Lift block if empty. | [More](/api/commands/lift-empty-block) |
|
||||
| .newlineInCode() | Add a newline character in code. | [More](/api/commands/newline-in-code) |
|
||||
| .resetAttributes() | Resets some node or mark attributes to the default value. | [More](/api/commands/reset-attributes) |
|
||||
| .setMark() | Add a mark with new attributes. | [More](/api/commands/set-mark) |
|
||||
| .setNode() | Replace a given range with a node. | [More](/api/commands/set-node) |
|
||||
| .splitBlock() | Forks a new node from an existing node. | [More](/api/commands/split-block) |
|
||||
| .toggleMark() | Toggle a mark on and off. | [More](/api/commands/toggle-mark) |
|
||||
| .toggleNode() | Toggle a node with another node. | [More](/api/commands/toggle-node) |
|
||||
| .toggleWrap() | Wraps nodes in another node, or removes an existing wrap. | [More](/api/commands/toggle-wrap) |
|
||||
| .undoInputRule() | Undo an input rule. | [More](/api/commands/undo-input-rule) |
|
||||
| .unsetAllMarks() | Remove all marks in the current selection. | [More](/api/commands/unset-all-marks) |
|
||||
| .unsetMark() | Remove a mark in the current selection. | [More](/api/commands/unset-mark) |
|
||||
| .updateAttributes() | Update attributes of a node or mark. | [More](/api/commands/update-attributes) |
|
||||
| clearNodes() | Normalize nodes to a simple paragraph. | [More](/api/commands/clear-nodes) |
|
||||
| createParagraphNear() | Create a paragraph nearby. | [More](/api/commands/create-paragraph-near) |
|
||||
| deleteNode() | Delete a node. | [More](/api/commands/delete-node) |
|
||||
| extendMarkRange() | Extends the text selection to the current mark. | [More](/api/commands/extend-mark-range) |
|
||||
| exitCode() | Exit from a code block. | [More](/api/commands/exit-code) |
|
||||
| joinBackward() | Join two nodes backward. | [More](/api/commands/join-backward) |
|
||||
| joinForward() | Join two nodes forward. | [More](/api/commands/join-forward) |
|
||||
| lift() | Removes an existing wrap. | [More](/api/commands/lift) |
|
||||
| liftEmptyBlock() | Lift block if empty. | [More](/api/commands/lift-empty-block) |
|
||||
| newlineInCode() | Add a newline character in code. | [More](/api/commands/newline-in-code) |
|
||||
| resetAttributes() | Resets some node or mark attributes to the default value. | [More](/api/commands/reset-attributes) |
|
||||
| setMark() | Add a mark with new attributes. | [More](/api/commands/set-mark) |
|
||||
| setNode() | Replace a given range with a node. | [More](/api/commands/set-node) |
|
||||
| splitBlock() | Forks a new node from an existing node. | [More](/api/commands/split-block) |
|
||||
| toggleMark() | Toggle a mark on and off. | [More](/api/commands/toggle-mark) |
|
||||
| toggleNode() | Toggle a node with another node. | [More](/api/commands/toggle-node) |
|
||||
| toggleWrap() | Wraps nodes in another node, or removes an existing wrap. | [More](/api/commands/toggle-wrap) |
|
||||
| undoInputRule() | Undo an input rule. | [More](/api/commands/undo-input-rule) |
|
||||
| unsetAllMarks() | Remove all marks in the current selection. | [More](/api/commands/unset-all-marks) |
|
||||
| unsetMark() | Remove a mark in the current selection. | [More](/api/commands/unset-mark) |
|
||||
| updateAttributes() | Update attributes of a node or mark. | [More](/api/commands/update-attributes) |
|
||||
|
||||
### Lists
|
||||
| Command | Description | Links |
|
||||
| ---------------- | ------------------------------------------- | ------------------------------------ |
|
||||
| .liftListItem() | Lift the list item into a wrapping list. | [More](/api/commands/lift-list-item) |
|
||||
| .sinkListItem() | Sink the list item down into an inner list. | [More](/api/commands/sink-list-item) |
|
||||
| .splitListItem() | Splits one list item into two list items. | [More](/api/commands/split-list-item) |
|
||||
| .toggleList() | Toggle between different list types. | [More](/api/commands/toggle-list) |
|
||||
| .wrapInList() | Wrap a node in a list. | [More](/api/commands/wrap-in-list) |
|
||||
| liftListItem() | Lift the list item into a wrapping list. | [More](/api/commands/lift-list-item) |
|
||||
| sinkListItem() | Sink the list item down into an inner list. | [More](/api/commands/sink-list-item) |
|
||||
| splitListItem() | Splits one list item into two list items. | [More](/api/commands/split-list-item) |
|
||||
| toggleList() | Toggle between different list types. | [More](/api/commands/toggle-list) |
|
||||
| wrapInList() | Wrap a node in a list. | [More](/api/commands/wrap-in-list) |
|
||||
|
||||
### Selection
|
||||
| Command | Description | Links |
|
||||
| --------------------- | --------------------------------------- | ------------------------------------ |
|
||||
| .blur() | Removes focus from the editor. | [More](/api/commands/blur) |
|
||||
| .deleteRange() | Delete a given range. | [More](/api/commands/delete-range) |
|
||||
| .deleteSelection() | Delete the selection, if there is one. | [More](/api/commands/delete-selection) |
|
||||
| .enter() | Trigger enter. | [More](/api/commands/enter) |
|
||||
| .focus() | Focus the editor at the given position. | [More](/api/commands/focus) |
|
||||
| .keyboardShortcut() | Trigger a keyboard shortcut. | [More](/api/commands/keyboard-shortcut) |
|
||||
| .scrollIntoView() | Scroll the selection into view. | [More](/api/commands/scroll-into-view) |
|
||||
| .selectAll() | Select the whole document. | [More](/api/commands/select-all) |
|
||||
| .selectNodeBackward() | Select a node backward. | [More](/api/commands/select-node-backward) |
|
||||
| .selectNodeForward() | Select a node forward. | [More](/api/commands/select-node-forward) |
|
||||
| .selectParentNode() | Select the parent node. | [More](/api/commands/select-parent-node) |
|
||||
| .setNodeSelection() | Creates a NodeSelection. | [More](/api/commands/set-node-selection) |
|
||||
| .setTextSelection() | Creates a TextSelection. | [More](/api/commands/set-text-selection) |
|
||||
| blur() | Removes focus from the editor. | [More](/api/commands/blur) |
|
||||
| deleteRange() | Delete a given range. | [More](/api/commands/delete-range) |
|
||||
| deleteSelection() | Delete the selection, if there is one. | [More](/api/commands/delete-selection) |
|
||||
| enter() | Trigger enter. | [More](/api/commands/enter) |
|
||||
| focus() | Focus the editor at the given position. | [More](/api/commands/focus) |
|
||||
| keyboardShortcut() | Trigger a keyboard shortcut. | [More](/api/commands/keyboard-shortcut) |
|
||||
| scrollIntoView() | Scroll the selection into view. | [More](/api/commands/scroll-into-view) |
|
||||
| selectAll() | Select the whole document. | [More](/api/commands/select-all) |
|
||||
| selectNodeBackward() | Select a node backward. | [More](/api/commands/select-node-backward) |
|
||||
| selectNodeForward() | Select a node forward. | [More](/api/commands/select-node-forward) |
|
||||
| selectParentNode() | Select the parent node. | [More](/api/commands/select-parent-node) |
|
||||
| setNodeSelection() | Creates a NodeSelection. | [More](/api/commands/set-node-selection) |
|
||||
| setTextSelection() | Creates a TextSelection. | [More](/api/commands/set-text-selection) |
|
||||
|
||||
<!-- ## Example use cases
|
||||
|
||||
|
||||
@@ -9,16 +9,30 @@ The editor fires a few different events that you can hook into. Let’s have a l
|
||||
|
||||
## List of available events
|
||||
|
||||
| Event | Description |
|
||||
| --------------- | --------------------------------- |
|
||||
| beforeCreate | Before the view is created. |
|
||||
| create | The editor is ready. |
|
||||
| update | The content has changed. |
|
||||
| selectionUpdate | The selection has changed. |
|
||||
| transaction | The editor state has changed. |
|
||||
| focus | The editor is focused. |
|
||||
| blur | The editor isn’t focused anymore. |
|
||||
| destroy | The editor is being destroyed. |
|
||||
### beforeCreate
|
||||
Before the view is created.
|
||||
|
||||
### create
|
||||
The editor is ready.
|
||||
|
||||
### update
|
||||
The content has changed.
|
||||
|
||||
### selectionUpdate
|
||||
The selection has changed.
|
||||
|
||||
### transaction
|
||||
The editor state has changed.
|
||||
|
||||
### focus
|
||||
The editor is focused.
|
||||
|
||||
### blur
|
||||
The editor isn’t focused anymore.
|
||||
|
||||
### destroy
|
||||
The editor is being destroyed.
|
||||
|
||||
|
||||
## Register event listeners
|
||||
There are three ways to register event listeners.
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
# UniqueId
|
||||
The `UniqueId` extension adds unique IDs to all nodes. The extension keeps track of your nodes, even if you split them, merge them, undo/redo changes, crop content, paste content … It just works.
|
||||
|
||||
Also, you can configure which node types get an unique ID, and which not, and you can customize how those IDs are generated.
|
||||
|
||||
:::pro Pro extension
|
||||
The UniqueId extension is the first tiptap pro extension we have released on top of all the free extensions. Access to the extension and the documentation requires a tiptap pro subscription. [Become a tiptap pro now!](/pricing)
|
||||
:::
|
||||
@@ -5,17 +5,52 @@
|
||||
This utility helps with all kinds of suggestions in the editor. Have a look at the [`Mention`](/api/nodes/mention), [`Hashtag`](/api/nodes/hashtag) or [`Emoji`](/api/nodes/emoji) node to see it in action.
|
||||
|
||||
## Settings
|
||||
| Option | Type | Default | Description |
|
||||
| --------------- | ----------- | --------------------- | ----------------------------------------------------------- |
|
||||
| char | `String` | `'@'` | The character that triggers the autocomplete popup. |
|
||||
| pluginKey | `PluginKey` | `SuggestionPluginKey` | A ProseMirror PluginKey. |
|
||||
| allowSpaces | `Boolean` | `false` | Allows or disallows spaces in suggested items. |
|
||||
| startOfLine | `Boolean` | `false` | Trigger the autocomplete popup at the start of a line only. |
|
||||
| decorationTag | `String` | `'span'` | The HTML tag that should be rendered for the suggestion. |
|
||||
| decorationClass | `String` | `'suggestion'` | A CSS class that should be added to the suggestion. |
|
||||
| command | `Function` | `() => {}'` | Executed when a suggestion is selected. |
|
||||
| items | `Function` | `() => {}` | Pass an array of filtered suggestions, can be async. |
|
||||
| render | `Function` | `() => ({})` | A render function for the autocomplete popup. |
|
||||
|
||||
### char
|
||||
The character that triggers the autocomplete popup.
|
||||
|
||||
Default: `'@'`
|
||||
|
||||
### pluginKey
|
||||
A ProseMirror PluginKey.
|
||||
|
||||
Default: `SuggestionPluginKey`
|
||||
|
||||
### allowSpaces
|
||||
Allows or disallows spaces in suggested items.
|
||||
|
||||
Default: `false`
|
||||
|
||||
### startOfLine
|
||||
Trigger the autocomplete popup at the start of a line only.
|
||||
|
||||
Default: `false`
|
||||
|
||||
### decorationTag
|
||||
The HTML tag that should be rendered for the suggestion.
|
||||
|
||||
Default: `'span'`
|
||||
|
||||
### decorationClass
|
||||
A CSS class that should be added to the suggestion.
|
||||
|
||||
Default: `'suggestion'`
|
||||
|
||||
### command
|
||||
Executed when a suggestion is selected.
|
||||
|
||||
Default: `() => {}'`
|
||||
|
||||
### items
|
||||
Pass an array of filtered suggestions, can be async.
|
||||
|
||||
Default: `() => {}`
|
||||
|
||||
### render
|
||||
A render function for the autocomplete popup.
|
||||
|
||||
Default: `() => ({})`
|
||||
|
||||
|
||||
## Source code
|
||||
[packages/suggestion/](https://github.com/ueberdosis/tiptap/blob/main/packages/suggestion/)
|
||||
|
||||
Reference in New Issue
Block a user