mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-21 06:31:28 +02:00
Add support for read-only and non-selectable elements (#5374)
* Add `isElementReadOnly` fix delete while selected fix type while selected fix failing test add tests add e2e test linter fixes add changeset * fix yarn build:next * Add `isSelectable`
This commit is contained in:
7
.changeset/spicy-phones-nail.md
Normal file
7
.changeset/spicy-phones-nail.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
'slate': minor
|
||||
---
|
||||
|
||||
- Add `isSelectable` to `editor` (default true). A non-selectable element is skipped over when navigating using arrow keys.
|
||||
- Add `ignoreNonSelectable` to `Editor.nodes`, `Editor.positions`, `Editor.after` and `Editor.before` (default false)
|
||||
- `Transforms.move` ignores non-selectable elements
|
5
.changeset/wicked-weeks-kick.md
Normal file
5
.changeset/wicked-weeks-kick.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'slate': minor
|
||||
---
|
||||
|
||||
- Add `isElementReadOnly` to `editor`. A read-only element behaves much like a void with regard to selection and deletion, but renders its `children` the same as any other non-void node.
|
Reference in New Issue
Block a user