mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-12 02:03:59 +02:00
docs: Try options syntax with defaults
This commit is contained in:
@@ -56,10 +56,10 @@ Get the matching ancestor above a location in the document.
|
|||||||
|
|
||||||
Options:
|
Options:
|
||||||
|
|
||||||
- `at?: Location`: Where to start at which is `editor.selection` by default.
|
- `at?: Location = editor.selection`: Where to start at which is `editor.selection` by default.
|
||||||
- `match?: NodeMatch`: Narrow the match
|
- `match?: NodeMatch = () => true`: Narrow the match
|
||||||
- `mode?: 'highest' | 'lowest'`: If `lowest` (default), returns the lowest matching ancestor. If `highest`, returns the highest matching ancestor.
|
- `mode?: 'highest' | 'lowest' = 'lowest'`: If `lowest` (default), returns the lowest matching ancestor. If `highest`, returns the highest matching ancestor.
|
||||||
- `voids?: boolean`: If `false` (default), ignore void objects. If `true`, include `void` objects.
|
- `voids?: boolean = false`: When `false` ignore void objects.
|
||||||
|
|
||||||
#### `Editor.after(editor: Editor, at: Location, options?) => Point | undefined`
|
#### `Editor.after(editor: Editor, at: Location, options?) => Point | undefined`
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user