1
0
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:
Sunny Hirai
2021-06-06 19:42:19 -07:00
parent 665b6c81ab
commit 1e6f60aa6d

View File

@@ -56,10 +56,10 @@ Get the matching ancestor above a location in the document.
Options:
- `at?: Location`: Where to start at which is `editor.selection` by default.
- `match?: NodeMatch`: Narrow the match
- `mode?: 'highest' | '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.
- `at?: Location = editor.selection`: Where to start at which is `editor.selection` by default.
- `match?: NodeMatch = () => true`: Narrow the match
- `mode?: 'highest' | 'lowest' = 'lowest'`: If `lowest` (default), returns the lowest matching ancestor. If `highest`, returns the highest matching ancestor.
- `voids?: boolean = false`: When `false` ignore void objects.
#### `Editor.after(editor: Editor, at: Location, options?) => Point | undefined`