mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-01-17 21:49:20 +01:00
Update Operation docs to add a table of contents and to fix the heading names
This commit is contained in:
parent
0861663a5c
commit
7c2beea54e
@ -2,6 +2,18 @@
|
||||
|
||||
`Operation` objects define the low-level instructions that Slate editors use to apply changes to their internal state. Representing all changes as operations is what allows Slate editors to easily implement history, collaboration, and other features.
|
||||
|
||||
- [Static methods](operation.md#static-methods)
|
||||
- [Manipulation methods](operation.md#manipulation-methods)
|
||||
- [Check methods](operation.md#check-methods)
|
||||
|
||||
## Static methods
|
||||
|
||||
### Manipulation methods
|
||||
|
||||
#### `inverse(op: Operation) => Operation`
|
||||
|
||||
Invert an operation, returning a new operation that will exactly undo the original when applied.
|
||||
|
||||
### Check methods
|
||||
|
||||
#### `isNodeOperation(value: any) => boolean`
|
||||
@ -23,9 +35,3 @@ Check if a value is a `SelectionOperation` object. Returns the value as a `Selec
|
||||
#### `isTextOperation(value: any) => boolean`
|
||||
|
||||
Check if a value is a `TextOperation` object. Returns the value as a `TextOperation` if it is one.
|
||||
|
||||
### Static methods
|
||||
|
||||
#### `inverse(op: Operation) => Operation`
|
||||
|
||||
Invert an operation, returning a new operation that will exactly undo the original when applied.
|
||||
|
Loading…
x
Reference in New Issue
Block a user