1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-26 16:44:22 +02:00
Commit Graph

1538 Commits

Author SHA1 Message Date
Bryan Haakman
5ef346feb9 Fix NODE_TO_KEY correction for split_node and merge_node (#4901)
* Fix NODE_TO_KEY correction for split_node and merge_node

* fix lint

* add changeset

* Add NODE_TO_KEY tests for number of mounts for split_node and merge_node
2022-03-25 00:57:17 +00:00
jasonphillips
2a8d86f1a4 Fix child element decorations (#4910)
* fix slate-react handling of nested element decorations

* chore: add changeset

* changes from review
2022-03-25 00:31:35 +00:00
zhugexinxin
43ca2b56c8 feat: add merge to setNodes and test (#4912)
* feat: add merge to setNodes and test

* Add changset

Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
2022-03-24 00:25:36 -07:00
Dylan Schiemann
3453432f7a Revert "Add merge to set node (#4905)" (#4913)
This reverts commit 9c758bb4cb.
2022-03-24 00:24:48 -07:00
zhugexinxin
9c758bb4cb Add merge to set node (#4905)
* feat: add merge to setNodes

* chore: add merge to setNodes test

* chore: prettier

* chore: change to PropsMerge

* chore: restore the changes for addMark
2022-03-23 22:56:17 -07:00
Dylan Schiemann
947883435f Fix logic in test, fixes #4764 (#4899) 2022-03-20 04:44:54 -07:00
Bryan Haakman
20acca4bc8 Add soft break as a separate overridable editor method (#4873)
add changeset
2022-03-20 04:30:08 -07:00
Ryan Mitts
07669dca4b When resolving a slate Point from a DOM selection (toSlatePoint), consider that a node is only void if it's within the same editor that is resolving the Point. (#4885)
If you have a nested editor setup. For example, one editor has a void node that contains another editor. In this case, a resolution of a selection by the nested editor previously would consider that the selection is for a void node since an ancestor void node does exist. However, this selection is only a void node in the context of this editor if the ancestor void node is contained in the editor.
2022-03-20 04:04:33 -07:00
github-actions[bot]
1433499e98 Version Packages (#4890)
* Version Packages

* Update packages/slate/CHANGELOG.md

* Update packages/slate/CHANGELOG.md

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
2022-03-14 22:36:10 -07:00
zhugexinxin
970523f881 feat: add custom compare node props (#4889)
* feat: add custom compare props

* chore: add test for custom compare props
2022-03-14 16:21:44 -07:00
Mohammad ali Ali panah
3b3b0e32df Fix chrome and edge three digit version check (#4883)
* fix chrome and edge three digit version check #4869

* add changelist
2022-03-14 16:19:36 -07:00
github-actions[bot]
2a620dc20d Version Packages (#4880)
* Version Packages

* Update changelog

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
2022-03-09 04:23:12 -07:00
Nemanja Tosic
1b205c087b Fix stale decorations (#4876)
* test changes

* fix decoration not updating

* Add changeset

* Fix lint issues

* Tests with earlier version of Node.js

* Bump node version on CI

The base typescript config uses ESNext as target, so presumably the
latest node should be used.

Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
2022-03-09 04:06:18 -07:00
Bryan Haakman
4d28948b90 Invert https://github.com/ianstormtaylor/slate/pull/4755 (#4874) 2022-03-08 19:40:50 -07:00
github-actions[bot]
7122454583 Version Packages (#4872)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-03-07 16:26:25 -07:00
yongzs
7499d4b4c0 fixed cursor when we triple click on text and type over it #4862 (#4868)
* fixed cursor when we triple click on text and type over it

* fixed

* fixed

* Add changeset

Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
2022-03-07 03:58:34 -07:00
github-actions[bot]
68aff89e89 Version Packages (#4863)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-03-03 18:47:48 -07:00
Fabio Moretti
47f2403e3a Feature/slate selectors (#4841)
* Added a redux inspired slate selector

* added changeset
2022-03-03 18:25:56 -07:00
github-actions[bot]
f0530d2097 Version Packages (#4859)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-03-01 22:50:27 -07:00
Andrew Herron
33be22f3e3 Reverted 03861af (#4804) and added a test for the exception it caused (#4858) 2022-03-01 22:47:00 -07:00
github-actions[bot]
442d263672 Version Packages (#4843)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-02-23 13:16:57 -07:00
Samu
482b090e6f fix point transform for insert_text to account for affinity (#4848)
* fix point transform for insert_text

* add changeset
2022-02-23 13:08:00 -07:00
Eric Meier
100448d55c render void spacer in readonly mode (#4840) 2022-02-17 04:57:30 -07:00
github-actions[bot]
9267355d22 Version Packages (#4820)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-02-11 04:18:07 -07:00
Eric Meier
d5ac82373b fix isDraggingInternally reset logic (#4828) 2022-02-10 21:00:17 -07:00
Masanori Onoue
80661509ec fix not update state when unmounted (#4819)
* fix not update state when unmounted

* add changeset
2022-02-05 04:36:25 -07:00
github-actions[bot]
4b97197f9a Version Packages (#4815)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-01-31 12:43:10 -07:00
Dylan Schiemann
27deaf3175 fix build (prettier) (#4817)
* fix build (prettier)

* fix build (prettier)
2022-01-31 11:50:34 -07:00
Dylan Schiemann
6d62abc103 Revert #4749 (#4816)
* Revert #4749

See note at https://github.com/ianstormtaylor/slate/pull/4749#issuecomment-1025742142

* Create olive-bags-talk.md

Add changeset
2022-01-31 07:57:41 -07:00
V_Lute
03861afc62 update insertText logic when selection is not collapsed (#4804)
* update insertText logic when selection is not collapsed

* add changeset

* fix bug when end of range is void

Co-authored-by: zhangpengcheng15 <zhangpengcheng15@jd.com>
2022-01-28 09:33:57 -07:00
Bryan Haakman
01dc0c57b2 Fix failing unhangRange test case with inlines (#4814)
* Add failing unhangRange test case

* Fix failing inline case?

* fix lint
2022-01-28 09:33:20 -07:00
github-actions[bot]
6ef6454e44 Version Packages (#4799)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-01-27 21:55:12 -07:00
Eric Meier
a5fd62ddd6 fix: toSlatePoint suppressThrow leaf without text node (#4813) 2022-01-27 18:09:05 -07:00
Eric Meier
e998752989 fix: flush onDOMSelectionChange on onDOMBeforeInput (#4809) 2022-01-27 07:20:08 -07:00
Sihong
3796c514d6 fix: text content not rendered on ssr (#4798) 2022-01-22 03:53:56 -07:00
github-actions[bot]
33c93a90c5 Version Packages (#4797)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-01-20 04:50:46 -07:00
Sihong
5d8a160669 fix: text not rendered on server-side rendering (#4796) 2022-01-20 03:32:15 -07:00
github-actions[bot]
a65aec1c27 Version Packages (#4794)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-01-19 09:23:34 -07:00
Vsevolod Rodionov
a3dfb151d4 Fix: when switching between editors, Slate selection and DOM Selection can mismatch which causes React to break (#4749) 2022-01-19 07:53:26 -07:00
David Brito
9f3aee5536 Merge layout effects for adding focus and blur event listeners (#4790)
* Merge layout effects for adding focus and blur event listeners

* run yarn fix
2022-01-19 07:51:42 -07:00
github-actions[bot]
11253c5c3b Version Packages (#4761)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-01-13 10:14:25 -07:00
陈耀耀
a8c08a4e01 Android merge Editor.insertText logic. (#4788)
* fix: Android merge Editor.insertText logic

* feat: add changeset
2022-01-13 06:24:36 -07:00
Alessio Galdy
67aa1f1010 Rollback 4779 and always call Transforms.setSelection (#4786)
* Revert "Fix Android editor.insertText regression (#4779)"

This reverts commit 345b8fc9e8.

* * Restore logic to delay text insertion on android
* Always call Trasform.setSelection before calling Editor.insertText

* change set

* yarn fix

* Fix changeset

* Restore old changeset file
2022-01-12 10:53:14 -07:00
Alessio Galdy
345b8fc9e8 Fix Android editor.insertText regression (#4779)
* * remove scheduling of text updates using setTimeout
* call Transforms.setSelection before Editor.insertText

* changeset

* Restore logic to set isComposing to false
2022-01-11 04:37:05 -07:00
Jacob Hurwitz
8daa77e9fa run focus event listener after existing onFocus handlers (#4755)
* run focus event listener after existing onFocus handlers

* change window.setTimeout to setTimeout
2022-01-10 16:20:47 -07:00
Dylan Schiemann
cc9cba017a Revert "Warn when normalization removes node (#4769)" (#4776)
This reverts commit 0ca31e7498.
2022-01-07 16:21:54 -07:00
Jim Fisher
0ca31e7498 Warn when normalization removes node (#4769)
* Warn when normalization removes node

Slate requires the invariant that children are all blocks or all inlines.
It enforces this in default normalization by removing children.
When such a node is removed, it's almost certainly due to a programming
error: the developer needs to fix their application to ensure it
maintains this invariant. But currently Slate does not tell the
developer this.

I made such a programming error, and spent a long time debugging nodes
that mysteriously went missing. I would have fixed it within 30 seconds
if Slate had warned me when it detected this error.

(Note I have used console.warn despite the eslint rule. As far as I can
see, Slate has no other facility for runtime warnings.)

* Add changeset
2022-01-05 17:44:48 -07:00
Alessio Galdy
e9a46ad29e Fix editor.insertText never gets called inside plugins on Android (#4753)
* Call Editor.insertText instead of Transforms.insertText to allow overriding by plugins

* Use Editor.insertText in android-input-manager

* changeset
2022-01-04 06:10:35 -07:00
github-actions[bot]
735d2d047a Version Packages (#4743)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-12-23 05:22:05 -07:00
github-actions[bot]
a54a8e317f Version Packages (#4736)
* Version Packages

* Update CHANGELOG.md

Add a missing changeset from one of the PRs.

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
2021-12-22 05:05:07 -07:00