mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-07-31 20:40:19 +02:00
Update Operation docs to add a table of contents and to fix the heading names
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user