docs: update content

This commit is contained in:
Philipp Kühn
2021-04-21 11:03:33 +02:00
parent cc8e879da0
commit 170b9b8d64
38 changed files with 228 additions and 50 deletions

View File

@@ -161,55 +161,54 @@ Have a look at all of the core commands listed below. They should give you a goo
| .setContent() | Replace the whole document with new content. | [More](/api/commands/set-content) | | .setContent() | Replace the whole document with new content. | [More](/api/commands/set-content) |
### Nodes & Marks ### Nodes & Marks
| Command | Description | | Command | Description | Links |
| ----------------------- | --------------------------------------------------------- | | ----------------------- | --------------------------------------------------------- | ------------------------------------ |
| .clearNodes() | Normalize nodes to a simple paragraph. | | .clearNodes() | Normalize nodes to a simple paragraph. | [More](/api/commands/clear-nodes) |
| .createParagraphNear() | Create a paragraph nearby. | | .createParagraphNear() | Create a paragraph nearby. | [More](/api/commands/create-paragraph-near) |
| .exitCode() | Exit from a code block. | | .extendMarkRange() | Extends the text selection to the current mark. | [More](/api/commands/extend-mark-range) |
| .extendMarkRange() | Extends the text selection to the current mark. | | .exitCode() | Exit from a code block. | [More](/api/commands/exit-code) |
| .joinBackward() | Join two nodes backward. | | .joinBackward() | Join two nodes backward. | [More](/api/commands/join-backward) |
| .joinForward() | Join two nodes forward. | | .joinForward() | Join two nodes forward. | [More](/api/commands/join-forward) |
| .lift() | Removes an existing wrap. | | .lift() | Removes an existing wrap. | [More](/api/commands/lift) |
| .liftEmptyBlock() | Lift block if empty. | | .liftEmptyBlock() | Lift block if empty. | [More](/api/commands/lift-empty-block) |
| .newlineInCode() | Add a newline character in code. | | .newlineInCode() | Add a newline character in code. | [More](/api/commands/newline-in-code) |
| .replace() | Replaces text with a node. | | .replace() | Replaces text with a node. | [More](/api/commands/replace) |
| .replaceRange() | Replaces text with a node within a range. | | .replaceRange() | Replaces text with a node within a range. | [More](/api/commands/replace-range) |
| .resetAttributes() | Resets some node or mark attributes to the default value. | | .resetAttributes() | Resets some node or mark attributes to the default value. | [More](/api/commands/reset-attributes) |
| .selectParentNode() | Select the parent node. | | .setMark() | Add a mark with new attributes. | [More](/api/commands/set-mark) |
| .setMark() | Add a mark with new attributes. | | .setNode() | Replace a given range with a node. | [More](/api/commands/set-node) |
| .setNode() | Replace a given range with a node. | | .splitBlock() | Forks a new node from an existing node. | [More](/api/commands/split-block) |
| .splitBlock() | Forks a new node from an existing node. | | .toggleMark() | Toggle a mark on and off. | [More](/api/commands/toggle-mark) |
| .toggleMark() | Toggle a mark on and off. | | .toggleNode() | Toggle a node with another node. | [More](/api/commands/toggle-node) |
| .toggleNode() | Toggle a node with another node. | | .toggleWrap() | Wraps nodes in another node, or removes an existing wrap. | [More](/api/commands/toggle-wrap) |
| .toggleWrap() | Wraps nodes in another node, or removes an existing wrap. | | .undoInputRule() | Undo an input rule. | [More](/api/commands/undo-input-rule) |
| .undoInputRule() | Undo an input rule. | | .unsetAllMarks() | Remove all marks in the current selection. | [More](/api/commands/unset-all-marks) |
| .unsetAllMarks() | Remove all marks in the current selection. | | .unsetMark() | Remove a mark in the current selection. | [More](/api/commands/unset-mark) |
| .unsetMark() | Remove a mark in the current selection. | | .updateAttributes() | Update attributes of a node or mark. | [More](/api/commands/update-attributes) |
| .updateAttributes() | Update attributes of a node or mark. |
### Lists ### Lists
| Command | Description | | Command | Description | Links |
| ---------------- | ------------------------------------------- | | ---------------- | ------------------------------------------- | ------------------------------------ |
| .liftListItem() | Lift the list item into a wrapping 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. | | .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. | | .splitListItem() | Splits one list item into two list items. | [More](/api/commands/split-list-item) |
| .toggleList() | Toggle between different list types. | | .toggleList() | Toggle between different list types. | [More](/api/commands/toggle-list) |
| .wrapInList() | Wrap a node in a list. | | .wrapInList() | Wrap a node in a list. | [More](/api/commands/wrap-in-list) |
### Selection ### Selection
| Command | Description | | Command | Description | Links |
| --------------------- | --------------------------------------- | | --------------------- | --------------------------------------- | ------------------------------------ |
| .blur() | Removes focus from the editor. | | .blur() | Removes focus from the editor. | [More](/api/commands/blur) |
| .deleteRange() | Delete a given range. | | .deleteRange() | Delete a given range. | [More](/api/commands/delete-range) |
| .deleteSelection() | Delete the selection, if there is one. | | .deleteSelection() | Delete the selection, if there is one. | [More](/api/commands/delete-selection) |
| .enter() | Trigger enter. | | .enter() | Trigger enter. | [More](/api/commands/enter) |
| .focus() | Focus the editor at the given position. | | .focus() | Focus the editor at the given position. | [More](/api/commands/focus) |
| .keyboardShortcut() | Trigger a keyboard shortcut. | | .keyboardShortcut() | Trigger a keyboard shortcut. | [More](/api/commands/keyboard-shortcut) |
| .scrollIntoView() | Scroll the selection into view. | | .scrollIntoView() | Scroll the selection into view. | [More](/api/commands/scroll-into-view) |
| .selectAll() | Select the whole document. | | .selectAll() | Select the whole document. | [More](/api/commands/select-all) |
| .selectNodeBackward() | Select a node backward. | | .selectNodeBackward() | Select a node backward. | [More](/api/commands/select-node-backward) |
| .selectNodeForward() | Select a node forward. | | .selectNodeForward() | Select a node forward. | [More](/api/commands/select-node-forward) |
| .selectParentNode() | Select the parent node. | | .selectParentNode() | Select the parent node. | [More](/api/commands/select-parent-node) |
<!-- ## Example use cases <!-- ## Example use cases

View File

@@ -0,0 +1,3 @@
# blur
TODO

View File

@@ -0,0 +1,3 @@
# createParagraphNear
TODO

View File

@@ -0,0 +1,3 @@
# deleteRange
TODO

View File

@@ -0,0 +1,3 @@
# deleteSelection
TODO

View File

@@ -0,0 +1,3 @@
# enter
TODO

View File

@@ -0,0 +1,3 @@
# exitCode
TODO

View File

@@ -0,0 +1,3 @@
# extendMarkRange
TODO

View File

@@ -0,0 +1,3 @@
# focus
TODO

View File

@@ -0,0 +1,3 @@
# joinBackward
TODO

View File

@@ -0,0 +1,3 @@
# joinForward
TODO

View File

@@ -0,0 +1,3 @@
# keyboardShortcut
TODO

View File

@@ -0,0 +1,3 @@
# liftEmptyBlock
TODO

View File

@@ -0,0 +1,3 @@
# liftListItem
TODO

View File

@@ -0,0 +1,3 @@
# lift
TODO

View File

@@ -0,0 +1,3 @@
# newlineInCode
TODO

View File

@@ -0,0 +1,3 @@
# replaceRange
TODO

View File

@@ -0,0 +1,3 @@
# replace
TODO

View File

@@ -0,0 +1,3 @@
# resetAttributes
TODO

View File

@@ -0,0 +1,3 @@
# scrollIntoView
TODO

View File

@@ -0,0 +1,3 @@
# selectAll
TODO

View File

@@ -0,0 +1,3 @@
# selectNodeBackward
TODO

View File

@@ -0,0 +1,3 @@
# selectNodeForward
TODO

View File

@@ -0,0 +1,3 @@
# selectParentNode
TODO

View File

@@ -0,0 +1,3 @@
# setMark
TODO

View File

@@ -0,0 +1,3 @@
# setNode
TODO

View File

@@ -0,0 +1,3 @@
# sinkListItem
TODO

View File

@@ -0,0 +1,3 @@
# splitBlock
TODO

View File

@@ -0,0 +1,3 @@
# splitListItem
TODO

View File

@@ -0,0 +1,3 @@
# toggleList
TODO

View File

@@ -0,0 +1,3 @@
# toggleMark
TODO

View File

@@ -0,0 +1,3 @@
# toggleNode
TODO

View File

@@ -0,0 +1,3 @@
# toggleWrap
TODO

View File

@@ -0,0 +1,3 @@
# undoInputRule
TODO

View File

@@ -0,0 +1,3 @@
# unsetAllMarks
TODO

View File

@@ -0,0 +1,3 @@
# unsetMark
TODO

View File

@@ -0,0 +1,3 @@
# wrapInList
TODO

View File

@@ -126,17 +126,88 @@
- title: Commands - title: Commands
link: /api/commands link: /api/commands
items: items:
- title: blur
link: /api/commands/blur
- title: clearContent - title: clearContent
link: /api/commands/clear-content link: /api/commands/clear-content
- title: insertContent
link: /api/commands/insert-content
- title: setContent
link: /api/commands/set-content
- title: clearNodes - title: clearNodes
link: /api/commands/clear-nodes link: /api/commands/clear-nodes
- title: createParagraphNear
link: /api/commands/create-paragraph-near
- title: deleteRange
link: /api/commands/delete-range
- title: deleteSelection
link: /api/commands/delete-selection
- title: enter
link: /api/commands/enter
- title: exitCode
link: /api/commands/exit-code
- title: extendMarkRange
link: /api/commands/extend-mark-range
- title: focus
link: /api/commands/focus
- title: insertContent
link: /api/commands/insert-content
- title: joinBackward
link: /api/commands/join-backward
- title: joinForward
link: /api/commands/join-forward
- title: keyboardShortcut
link: /api/commands/keyboard-shortcut
- title: liftEmptyBlock
link: /api/commands/lift-empty-block
- title: liftListItem
link: /api/commands/lift-list-item
- title: lift
link: /api/commands/lift
- title: newlineInCode
link: /api/commands/newline-in-code
- title: raplaceRange
link: /api/commands/replace-range
- title: replace
link: /api/commands/replace
- title: resetAttributes
link: /api/commands/reset-attributes
- title: scrollIntoView
link: /api/commands/scroll-into-view
- title: selectAll
link: /api/commands/select-all
- title: selectNodeBackward
link: /api/commands/select-node-backward
- title: selectNodeForward
link: /api/commands/select-node-forward
- title: selectParentNode
link: /api/commands/select-parent-node
- title: setContent
link: /api/commands/set-content
- title: setMark
link: /api/commands/set-mark
- title: setNode
link: /api/commands/set-node
- title: sinkListItem
link: /api/commands/sink-list-item
- title: splitBlock
link: /api/commands/split-block
- title: splitListItem
link: /api/commands/split-list-item
- title: toggleList
link: /api/commands/toggle-list
- title: toggleMark
link: /api/commands/toggle-mark
- title: toggleNode
link: /api/commands/toggle-node
- title: toggleWrap
link: /api/commands/toggle-wrap
- title: undoInputRule
link: /api/commands/undo-input-rule
- title: unsetAllMarks
link: /api/commands/unset-all-marks
- title: unsetMark
link: /api/commands/unset-mark
- title: updateAtttributes - title: updateAtttributes
link: /api/commands/update-attributes link: /api/commands/update-attributes
- title: wrapInList
link: /api/commands/wrap-in-list
- title: Nodes - title: Nodes
link: /api/nodes link: /api/nodes
items: items: