mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-13 18:53:59 +02:00
Move Node Options up in documentation
This commit is contained in:
@@ -30,6 +30,8 @@ interface Editor {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Jump to:
|
||||||
|
|
||||||
- [Instantiation methods](#instantiation-methods)
|
- [Instantiation methods](#instantiation-methods)
|
||||||
- [Static methods](#static-methods)
|
- [Static methods](#static-methods)
|
||||||
- [Instance methods](#instance-methods)
|
- [Instance methods](#instance-methods)
|
||||||
|
@@ -2,20 +2,17 @@
|
|||||||
|
|
||||||
Transforms are helper functions operating on the document. They can be used in defining your own commands.
|
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)
|
- [Node Transforms](#node-transforms)
|
||||||
- [Selection Transforms](#selection-transforms)
|
- [Selection Transforms](#selection-transforms)
|
||||||
- [Text Transforms](#text-transforms)
|
- [Text Transforms](#text-transforms)
|
||||||
- [Editor Transforms](#general-transforms)
|
- [Editor Transforms](#general-transforms)
|
||||||
|
|
||||||
## Node transforms
|
## Node Options
|
||||||
|
|
||||||
Transforms that operate on nodes.
|
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.
|
||||||
|
|
||||||
###### 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.
|
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
interface NodeOptions {
|
interface NodeOptions {
|
||||||
@@ -26,6 +23,10 @@ interface NodeOptions {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Node transforms
|
||||||
|
|
||||||
|
Transforms that operate on nodes.
|
||||||
|
|
||||||
###### `Transforms.insertNodes(editor: Editor, nodes: Node | Node[], options?)`
|
###### `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.
|
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.
|
||||||
|
Reference in New Issue
Block a user