* fix(android): clipboard application/x-slate-fragment is missing on paste in android
* add event onCut
* add changeset
* make slate fragment available when props onPaste, call preventDefault
* .
* get the fragment from text/html when it missing
* remove setData
* use getClipboardData instead of hooks
* use native character insertion to fix browser/OS text features. (flickering spellcheck, autocorrect, text shortcuts, etc.)
move some checks into previous if statement, remove commented out code
move native behavior into `slate-react`, and remove any external interface
dont use native editing if marks are set, as a new node will be inserted
match -> above
remove nativeOperationsQueue from editor
bail out of native queueing and immediately flush events if non insert_text operation is being applied.
* Convert TextString to a functional component
* Batch normalization of native op application
* Add changeset
* only proceed as native event if single character non-special character or space, to limit potential bad side effects.
* Revert "fix ime double input with mark"
* Comment wording tweak
Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
* Comment wording tweak
Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
* Comment wording tweak
Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
* Comment wording tweak
Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
* Comment wording tweak
Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
Co-authored-by: Ludwig Pettersson <luddep@gmail.com>
Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
* Remove fast-deep-equal in favour of a custom slate-specific equality check that only supports nested objects
* Add array comparison to deep equal. Fix bug with multiple nested objects.
* test: add test case for bug
* prefer next will transforming selection in remove_node
* add remove_node test
* Add changeset
* review: handle nested blocks
* refactor
* Revert "refactor"
This reverts commit 45a8aab7cb8408295c93d48186f5c7ecb135f4ae.
Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
* Update `findDocumentOrShadowRoot` to return undefined instead of throwing unnecessarily
* Small refactoring to improve the diff for reviewers
* Add changeset for patch
* Update new-trainers-peel.md
* Resolve PR comments
* Revert undefined checks, return window.document and update changeset
* Simplify findDocumentOrShadowRoot based on PR feedback
* Re-run CI
Thanks everyone for your review and thanks @ben10code for your first contribution!
* Do not remove empty node in merge operation if it is first children in parent(#4228)
* Create merge-nodes-issue
* fix typo in changeset
Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
* fix bug: decorate is not called for immediate children of editor
* short-circuit return instead of else in Child
Co-authored-by: Tim Buckley <timothypbuckley@gmail.com>
* oops missing brace
* changeset
Co-authored-by: Tim Buckley <timothypbuckley@gmail.com>
* Revert "Temporarily revert Android commits in order to create a release of Slate focused solely on Android (#4256)"
This reverts commit 4f502119841d013ea2749e91f4bd1f793dc7f98e.
* Updates to android composition manager
* Add user input tracking
It's necessary to only track mutations that result from user input. Some mutations that happen inside block or leaf nodes can happen outside of the render loop of the Editable component.
* Revert "Add DefaultEditable and AndroidEditable to exports (#4255)"
This reverts commit 5298e51f6e8a7d62acb71092f7afd6565cbdc65e.
* Revert "Feature/android keyboard support (#4200)"
This reverts commit e03ce7c5614a1a69d039bfbeea94696376585fd0.
* Added Android Keyboard Support
* Added changeset for android keyboard support
* Removed dead code in android editable that supported non-android environments
* Removed unnecessary attributes observation for android-editable
* Removed dead code
* Added no-error boundary
* Fixed issues with linters
* Update IS_FIREFOX_LEGACY flag to prevent FF crash
#4118 and #4150 introduced IS_FIREFOX_LEGACY, but this block of code was not updated to reflect that. This breaks insertion of emoji and unicode characters in slate-react. This change fixes#3855.
* Update editable.tsx
* Create forty-mails-roll.md
* Update editable.tsx
Apologies, in my tests I was using yarn patch and didn't need to modify the import statement, hopefully this will pass CI now.
Co-authored-by: Ian Storm Taylor <ian@ianstormtaylor.com>
* Test cases for failure condition
* Before normalizing ensure all elements have at least one text child. This is a normalization requirement that some normalization fixes require, so it must be done as an initial dedicated pass.
* Added try/finally to editor.apply and Editor.withoutNormalizing for state cleanup
* Added insert_node path checking to match how other operations are applied