1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-12 18:24:03 +02:00

Move Node Options up in documentation

This commit is contained in:
Sunny Hirai
2021-03-29 00:54:15 -07:00
parent 0895968900
commit 6b94fb17c8
2 changed files with 10 additions and 7 deletions

View File

@@ -30,6 +30,8 @@ interface Editor {
}
```
Jump to:
- [Instantiation methods](#instantiation-methods)
- [Static methods](#static-methods)
- [Instance methods](#instance-methods)

View File

@@ -2,20 +2,17 @@
Transforms are helper functions operating on the document. They can be used in defining your own commands.
Jump to section:
Jump to:
- [Node Options](#node-options)
- [Node Transforms](#node-transforms)
- [Selection Transforms](#selection-transforms)
- [Text Transforms](#text-transforms)
- [Editor Transforms](#general-transforms)
## Node transforms
## Node Options
Transforms that operate on nodes.
###### NodeOptions
All transforms listed below 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.
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.
```typescript
interface NodeOptions {
@@ -26,6 +23,10 @@ interface NodeOptions {
}
```
## Node transforms
Transforms that operate on nodes.
###### `Transforms.insertNodes(editor: Editor, nodes: Node | Node[], options?)`
Insert `nodes` at the specified location in the document. If no location is specified, insert at the current selection. If there is no selection, insert at the end of the document.