mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-21 14:41:23 +02:00
feat(docs): mention third parameter to toSlateRange
method in the docs (#4416)
* Add third parameter to `toSlateRange` method The `toSlateRange` method accepts an optional third parameter that is an object with property `exactMatch` and value is a boolean. Example of this implementation can be found at the `Editable` component of `slate-react`, inside the custom `onDOMSelectionChange`. * toSlateRange third param is optional Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org> No changeset as it's a doc update.
This commit is contained in:
@@ -168,7 +168,7 @@ Get the target range from a DOM `event`.
|
|||||||
|
|
||||||
Find a Slate point from a DOM selection's `domNode` and `domOffset`.
|
Find a Slate point from a DOM selection's `domNode` and `domOffset`.
|
||||||
|
|
||||||
### `toSlateRange(editor: ReactEditor, domRange: DOMRange | DOMStaticRange | DOMSelection)`
|
### `toSlateRange(editor: ReactEditor, domRange: DOMRange | DOMStaticRange | DOMSelection, options?: { exactMatch?: boolean } = {})`
|
||||||
|
|
||||||
Find a Slate range from a DOM range or selection.
|
Find a Slate range from a DOM range or selection.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user