* 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.
* Comment out currently flaky integration test
Even with a longer timeout, this test is intermittently failing, causing most PRs to show as failing.
* Update cypress/integration/examples/code-highlighting.ts
* 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!
* Add third parameter to `toSlateRange` method
The `toSlateRange` method accepts an optional third parameter that is an object with property `exactMatch` and value is a boolean.
Example of this implementation can be found at the `Editable` component of `slate-react`, inside the custom `onDOMSelectionChange`.
* toSlateRange third param is optional
Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
No changeset as it's a doc update.
* created editable-voids cypress test
* created markdown-preview cypress test
* created images cypress test
* created huge-document cypress test
* added hovering-toolbar, and forced-layout cypress tests
* added embeds cypress test
No changeset as it's adding tests for the examples.
* 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>
* cypress: mentions example test
* cypress: search highlighting test
* cypress: tables example test
* cypress: check html in richtext
* Update cypress/integration/mentions.ts
Co-authored-by: Tim Buckley <timothypbuckley@gmail.com>
* Update cypress/integration/search-highlighting.ts
Co-authored-by: Tim Buckley <timothypbuckley@gmail.com>
* cypress: reset page before each test case
* cypress: Custom command dataCy
* cypress: seperate directory for examples' tests
* cypress: remove comments
* cypress: add placeholder test
* cypress: add plain text test
Co-authored-by: Tim Buckley <timothypbuckley@gmail.com>
* added cypress test for check-list page
* Update cypress/integration/checkLists.ts
Co-authored-by: Tim Buckley <timothypbuckley@gmail.com>
* Update cypress/integration/checkLists.ts
Co-authored-by: Tim Buckley <timothypbuckley@gmail.com>
* Update cypress/integration/checkLists.ts
Co-authored-by: Tim Buckley <timothypbuckley@gmail.com>
* Added beforeEach() call
* moved the checkLists.ts example to the examples folder
Co-authored-by: Tim Buckley <timothypbuckley@gmail.com>
* Added cypress test for links and markdownShortcuts
* Update cypress/integration/markdownShortcuts.ts
Co-authored-by: Tim Buckley <timothypbuckley@gmail.com>
* Update cypress/integration/markdownShortcuts.ts
Co-authored-by: Tim Buckley <timothypbuckley@gmail.com>
* Update cypress/integration/links.ts
Co-authored-by: Tim Buckley <timothypbuckley@gmail.com>
Co-authored-by: Tim Buckley <timothypbuckley@gmail.com>