mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-01-29 19:27:43 +01:00
docs: Update all reference docs to use a combined list for anchor links
This commit is contained in:
parent
a02787539a
commit
28314d82fc
@ -9,10 +9,11 @@ interface Element {
|
||||
}
|
||||
```
|
||||
|
||||
## Static methods
|
||||
- [Static methods](static-methods)
|
||||
- [Retrieval methods](#retrieval-methods)
|
||||
- [Check methods](#check-methods)
|
||||
|
||||
- [Retrieval methods](#retrieval-methods)
|
||||
- [Check methods](#check-methods)
|
||||
## Static methods
|
||||
|
||||
### Retrieval methods
|
||||
|
||||
|
@ -1,8 +1,15 @@
|
||||
# Location
|
||||
|
||||
## Static methods
|
||||
The Location interface is a union of the ways to refer to a specific location in a Slate document: paths, points or ranges. Methods will often accept a Location instead of requiring only a Path, Point or Range.
|
||||
|
||||
- [Check methods](#check-methods)
|
||||
```typescript
|
||||
type Location = Path | Point | Range
|
||||
```
|
||||
|
||||
- [Static methods](static-methods)
|
||||
- [Check methods](#check-methods)
|
||||
|
||||
## Static methods
|
||||
|
||||
### Check methods
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
# Node
|
||||
|
||||
## Static methods
|
||||
- [Static methods](#static-methods)
|
||||
- [Retrieval methods](#retrieval-methods)
|
||||
- [Text methods](#text-methods)
|
||||
- [Check methods](#check-methods)
|
||||
|
||||
- [Retrieval methods](#retrieval-methods)
|
||||
- [Text methods](#text-methods)
|
||||
- [Check methods](#check-methods)
|
||||
## Static methods
|
||||
|
||||
### Retrieval methods
|
||||
|
||||
|
@ -6,11 +6,12 @@
|
||||
type Path = number[]
|
||||
```
|
||||
|
||||
## Static methods
|
||||
- [Static methods](#static-methods)
|
||||
- [Retrieval methods](#retrieval-methods)
|
||||
- [Check methods](#check-methods)
|
||||
- [Transform method](#transform-method)
|
||||
|
||||
- [Retrieval methods](#retrieval-methods)
|
||||
- [Check methods](#check-methods)
|
||||
- [Transform method](#transform-method)
|
||||
## Static methods
|
||||
|
||||
### Retrieval methods
|
||||
|
||||
|
@ -10,8 +10,13 @@ interface PointRef {
|
||||
}
|
||||
```
|
||||
|
||||
- [Static methods](#static-methods)
|
||||
- [Transform methods](#trasnform-methods)
|
||||
|
||||
## Static methods
|
||||
|
||||
### Transform methods
|
||||
|
||||
###### `PointRef.transform(ref: PointRef, op: Operation)`
|
||||
|
||||
Transform the point refs current value by an `op`.
|
||||
|
@ -10,11 +10,12 @@ interface Point {
|
||||
}
|
||||
```
|
||||
|
||||
## Static methods
|
||||
- [Static methods](#static-methods)
|
||||
- [Retrieval methods](#retrieval-methods)
|
||||
- [Check methods](#check-methods)
|
||||
- [Transform method](#transform-method)
|
||||
|
||||
- [Retrieval methods](#retrieval-methods)
|
||||
- [Check methods](#check-methods)
|
||||
- [Transform method](#transform-method)
|
||||
## Static methods
|
||||
|
||||
### Retrieval methods
|
||||
|
||||
|
@ -10,8 +10,13 @@ interface RangeRef {
|
||||
}
|
||||
```
|
||||
|
||||
- [Static methods](#static-methods)
|
||||
- [Transform methods](#transform-methods)
|
||||
|
||||
## Static methods
|
||||
|
||||
### Transform methods
|
||||
|
||||
###### `RangeRef.transform(ref: RangeRef, op: Operation)`
|
||||
|
||||
Transform the range refs current value by an `op`.
|
||||
|
@ -10,11 +10,12 @@ interface Range {
|
||||
}
|
||||
```
|
||||
|
||||
## Static methods
|
||||
- [Static methods](#static-methods)
|
||||
- [Retrieval methods](#retrieval-methods)
|
||||
- [Check methods](#check-methods)
|
||||
- [Transform methods](#transform-methods)
|
||||
|
||||
- [Retrieval methods](#retrieval-methods)
|
||||
- [Check methods](#check-methods)
|
||||
- [Transform method](#transform-method)
|
||||
## Static methods
|
||||
|
||||
### Retrieval methods
|
||||
|
||||
|
@ -9,10 +9,11 @@ interface Text {
|
||||
}
|
||||
```
|
||||
|
||||
## Static methods
|
||||
- [Static methods](#static-methods)
|
||||
- [Retrieval methods](#retrieval-methods)
|
||||
- [Check methods](#check-methods)
|
||||
|
||||
- [Retrieval methods](#retrieval-methods)
|
||||
- [Check methods](#check-methods)
|
||||
## Static methods
|
||||
|
||||
### Retrieval methods
|
||||
|
||||
|
@ -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)`
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user