Skip to content

Commit

Permalink
Merge pull request #3787 from glebinsky/patch-1
Browse files Browse the repository at this point in the history
Update block-selection.mdx
  • Loading branch information
zbeyens authored Nov 18, 2024
2 parents d007dbf + 68b3f71 commit 1e9b3c1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions apps/www/content/docs/block-selection.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ To control the scrollable container, configure the `boundaries` and `container`

For this to work effectively:

1. Add an `id` or `className` to your scroll container. If you not sure about the container, you can add it to the `<Editor />` component. We recommend using `id={editor.uid}`.
1. Add an `id` or `className` to your scroll container. If you're not sure about the container, you can add it to the `<Editor />` component. We recommend using `id={editor.uid}`.
2. Use the appropriate selector in your configuration.
3. Don't forget to set `position: relative` to the container.

Expand All @@ -90,9 +90,9 @@ BlockSelectionPlugin.configure({

### Set scroll speed

useing `options.areaOptions.behaviour.scrolling.speedDivider` to set the scroll speed.
Use `options.areaOptions.behaviour.scrolling.speedDivider` to set the scroll speed.

The value of `0.8` is our recommended speed since it's near the browser-native speed.
The value `0.8` is our recommended speed since it's near the browser-native speed.


```ts
Expand Down Expand Up @@ -160,7 +160,7 @@ const handleClickOutside = (event: MouseEvent) => {
### Selection area
Style the selection area using `.slate-selection-area` class to your editor container component. For example:
Style the selection area by adding the `.slate-selection-area` class to your editor container component. For example:
```js
'[&_.slate-selection-area]:border [&_.slate-selection-area]:border-primary [&_.slate-selection-area]:bg-primary/10'
Expand Down Expand Up @@ -375,4 +375,4 @@ Returns fragment prop for the currently selected blocks.
### useSelectionArea
A hook that initializes and manages the selection area functionality.
A hook that initializes and manages the selection area functionality.

0 comments on commit 1e9b3c1

Please sign in to comment.