* 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
* Set CPU limit for Next build
* It looks like it worked, re-running to be sure
* That worked too, one more time...
* Revert "Set CPU limit for Next build" to make sure this is the fix
This reverts commit d8274996f0.
* Un-revert "Set CPU limit for Next build"
This reverts commit d7e06c8ad8.
* 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: types for richtext.tsx
* fix: types for check-lists, code-highlighting and custom placeholder
* fix: types for editable-voids, embeds, forced-layout, hovering-toolbar
* fix: types for remaining examples
* fix: typescript error for files in image element
* fix: types for examples and some minor fixes
* fix: normalize-tokens.ts type
* fix: types for [example].tsx
I noticed that the current example for toggling a code block using the backtick (`) key doesn't work as expected. The issue occurs because `Editor.nodes()` can return text nodes instead of block elements, causing`Transforms.setNodes()` to fail.
To fix this, I added an extra check using `Element.isElement(n)`, ensuring that only block elements are transformed.