* removed unnecessary edge case deletion logic on android
* woops looks like that edge case was necessary after all. readding it with extra logic to handle forward deletion
* changeset and lint
* Fix backspace for more grapheme clusters (#5887)
This fix is specifically for the following languages:
- Burmese
- Hindi
- Khmer
- Malayalam
- Oriya
- Punjabi
- Tamil
- Telugu
* Clean up code formatting around fixing backspace with grapheme clusters
* Add changeset for backspace fix for additional grapheme clusters
* Improve code formatting to align with prettier code style
* optimize editor#apply and allow potential paths as input
* fix Editor#above regression for cross-node ranges
* add test to prevent regressions
* add changeset
* improve comment
* factor out for-loop that will never actually loop
* aw crud I didnt lint. fixing
* Refactor `insertFragment` without altering behaviour
* Fix inserting a fragment containing exactly two blocks
* Fix and unskip insertFragment list test
* fix(docs): Consider passed options when overriding normalizeNode
* feat: Allow to prevent data-loss on normalizeNode
When overriding normalizeNode, you can specify a `wrapperElement`
that is used to wrap text & inline nodes which would otherwise be
deleted in the normalization path if they are not allowed.
* changeset
* Remove the `isPlainObject` check from `isText` and `isElement` for performance
* Optimise `isElement`, `isNodeList` and `isText` further
* Update changeset
* Fix changeset
* Refactor object check into `isObject`
* fix: correct dirty path update for Text nodes
Previously, the condition used was "if (!Text.isText)" without passing the node, which always evaluated to false. This caused the code to always take the branch intended for non-Text nodes, even for Text nodes. The fix now correctly checks "if (Text.isText(node))" to determine if the node is a Text node. Text nodes, which have no children, will now correctly add only their own path, while non-Text nodes continue to have all their descendant paths added. This change ensures that the dirty path update logic behaves as intended.
* Add changeset
---------
Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
* fix: fix data loss in base `normalizeData` if no blocks allowed
Use `unwrapNodes` instead of `removeNodes` to
convert block to inline/text nodes.
* changeset
* Use extended `Editor` type in `useSlateWithV` return type
So it matches the return types of `useSlate` and `useSlateStatic`. The
`useSlateWithV` return object's `editor` property is currently typed as
just a `ReactEditor`, which causes type errors in our app when we try to
use it as the extended `Editor` type.
* Fix return types in "Editor hooks" docs
* Copied some things from slate-react into new react-dom package
* Refactor slate-react to use slate-dom
* Fixed failing tests
* Created changeset
* Ran fix:prettier
* Fixed name
* Removed duplicate code
* Fixed import
* Restored linting rule
* Bumped slate-dom version
* Bumped slate dependency version
* Added export of IS_NODE_MAP_DIRTY after rebase