1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-28 09:29:49 +02:00

docs: Update all reference docs to use a combined list for anchor links

This commit is contained in:
Sunny Hirai
2021-03-30 00:08:35 -07:00
parent a02787539a
commit 28314d82fc
10 changed files with 60 additions and 36 deletions

View File

@@ -2,15 +2,14 @@
Transforms are helper functions operating on the document. They can be used in defining your own commands.
Jump to:
- [Node options](#node-options)
- [Static methods](#static-methods)
- [Node transforms](#node-transforms)
- [Selection transforms](#selection-transforms)
- [Text transforms](#text-transforms)
- [Editor transforms](#editor-transforms)
- [Node Options](#node-options)
- [Node Transforms](#node-transforms)
- [Selection Transforms](#selection-transforms)
- [Text Transforms](#text-transforms)
- [Editor Transforms](#general-transforms)
## Node Options
## Node options
All transforms support a parameter `options`. This includes options specific to the transform, and general `NodeOptions` to specify the place in the document that the transform is applied to.
@@ -23,7 +22,9 @@ interface NodeOptions {
}
```
## Node transforms
## Static methods
### Node transforms
Transforms that operate on nodes.
@@ -87,7 +88,7 @@ Move the nodes from an origin to a destination. A destination must be specified
Options supported: `NodeOptions & {to: Path}`. For `options.mode`, `'all'` is also supported.
## Selection transforms
### Selection transforms
Transforms that operate on the document's selection.
@@ -121,7 +122,7 @@ Options: `{edge?: 'anchor' | 'focus' | 'start' | 'end'}`
Set new properties on the selection.
## Text transforms
### Text transforms
Transforms that operate on text.
@@ -143,7 +144,7 @@ Insert a string of text at the specified location in the document. If no locatio
Options: `{at?: Location, voids?: boolean}`
## General transform
### Editor transforms
###### `Transforms.transform(editor: Editor, transform: Transform)`