1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-11 09:43:58 +02:00
Commit Graph

1000 Commits

Author SHA1 Message Date
github-actions[bot]
b64af40cd5 Version Packages (#5114)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-09-10 06:17:16 -07:00
Sihong
9815bdabdd fix: selection out of sync in readonly mode (#5120) 2022-09-09 20:14:54 -07:00
Kitty Giraudel
8eb1972b5b Add aria-multiline attribute to textbox editor (#5100)
* Add `aria-multiline` attribute to textbox editor

* Add a changeset
2022-09-05 21:16:10 -07:00
Simon Chan
55b9574097 Use callback-style ref in Element component (#5105)
* Use callback-style ref in Element component

* Add changeset
2022-09-05 21:15:47 -07:00
github-actions[bot]
98afb5abf8 Version Packages (#5086)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-08-22 17:27:28 -07:00
Twiggeh
a10cb2564a Fix children being undefined on HMR uploads. (#5094) 2022-08-22 16:56:40 -07:00
Ivan Voskoboinyk
e18879e728 Fix - withReact type signature (#5091)
* Fix signature of `withReact` function

Fixes #4144

* Fix code to pass type checks

* Add a changeset entry
2022-08-22 16:48:27 -07:00
Eric Meier
50de780b1c Fix selection handling with slow flush in mark placeholders on android, fix auto-capitalize after placeholder (#5084)
* Fix selection handling with slow flush in mark placeholders on android, fix auto-capitalize after placeholder

* Add changeset

* Correct typos
2022-08-18 05:18:39 -07:00
Eric Meier
82a10a38e6 Prevent swiftkey from closing when typing next to the placeholder element (#5070) 2022-08-02 08:02:19 -07:00
github-actions[bot]
1d5984cccd Version Packages (#5058)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-29 04:08:20 -07:00
Eric Meier
fbab6331a5 Android input handing rewrite (#4988)
* wip

* wip

* wip - fully working without hard marks

* fix editor crashes when inserting/deleting at the edges of marks

* fix various restore dom related crashes

* fix delete with pending changes, zero widths on android, mutation tracking

* track placeholder delete in detached strings, zero-widths

* wip mark placeholders

* get rid of mutation detection in favor of beforeinput

* fix various selection race conditions

* fix various crashes when deleting at the beginning of nodes

* wip diff transforms, selection handling fixes

* cleanup restoreDOM and fix noop restore edge-case

* fix mark placeholders

* fix toSlatePoint edge-case

* properly flush user select with pending changes

* Prevent editor crash when deleting before a non-contenteditable element

* wip markdown shortcut example

* transform pending changes and selection by remote changes, simplify pending actions, handle all input types

* improve change transform, mark(-placeholder) handling

* manually handle gboard bug, fix restoredom nested editor

* fix parent mutation condition

* cleanup, mark placeholder fixes

* mark placeholder fixes

* fix mark placeholder condition

* hide placeholder if we have pending diffs

* cleanup

* yarn install

* add workaround for swiftkey placeholder issue

* cleanup

* add changeset

* feat(slate-react): fix edge-case crash, add androidPendingDiffs, rename scheduleFlushPendingChanges

* flush pending selection on same line without pending changes/action

* keep formatting of pending diffs when adding/removing selection marks

* unref selection ref on unmatching dom state

* improve markdown shortcut example flush trigger to show how a more generic solution would work

* fix markdown shortcut example trigger logic

* fix isInsertAfterMarkPlaceholder logic
2022-07-29 04:04:33 -07:00
github-actions[bot]
f55026f0ba Version Packages (#5049)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-22 16:37:11 -07:00
Bryan Haakman
9bc0b6132a Change how Slate context updates and introduce useSlateSelection hook (#5041)
* Fix DOM selection sync when there are unexpected rerenders

* Create a useSlateSelection hook and expose it

* update docs

* add changeset

* Undo the useEffect change and add a useSlateValue method

* Use a version counter instead for SlateContext

* comment out layout effect prevention for now

* Undo useV comparison for now

* Change the changeset

* Fix lint

* Remove the useSlateValue hook

* remove some unused imports

* Add useSlateWithV to the docs

* fix changeset lint

* Change changeset to minor instead
2022-07-22 16:27:26 -07:00
Eric Meier
1cc0797f53 Fix toSlatePoint in void nodes with nested editors if children are rendered as the last child (#5054) 2022-07-22 16:27:10 -07:00
github-actions[bot]
22951adf93 Version Packages (#5040)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-15 06:18:53 -07:00
Bryan Haakman
11a93e65de Upgrade next.js to 12 and related packages (#5042)
* Upgrade next.js and source-map-loader

* Add changeset

* Upgrade eslint and typescript

* improve reliability of iframe test

* fix lint
2022-07-15 06:14:18 -07:00
Eric Meier
f96b659755 fix macos accent menu when using arrow keys (#5046) 2022-07-15 06:12:48 -07:00
Eric Meier
0b2e6c79c0 Don't native insert in elements with white-space="pre" containing tab chars (#5045)
* don't native insert in elements with white-space="pre" containing tab chars

* apply suggestions from code review
2022-07-15 06:11:52 -07:00
github-actions[bot]
1c5639fdd6 Version Packages (#5009)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-03 04:16:55 -07:00
Alexander Campbell
fe13a8f9e7 implement scrubber for end user data in exceptions (#4999) 2022-05-26 14:44:22 -07:00
github-actions[bot]
25be3b7031 Version Packages (#4985)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-25 17:00:21 -07:00
jasonphillips
92c5730a96 Fix: revert to prior decorations behavior (#5007)
* Revert "Fix child element decorations (#4910)"

This reverts commit 2a8d86f1a4.

* Revert "Fix stale decorations (#4876)"

This reverts commit 1b205c087b.

* chore: add changeset
2022-05-25 14:01:14 -07:00
github-actions[bot]
1555ac8402 Version Packages (#4982)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-04 16:27:40 -07:00
Eric Meier
cb8a551508 Add ReactEditor.isComposing(editor) (#4981)
* Add ReactEditor.isComposing(editor)

* Upate changeset from patch to minor
2022-05-02 12:09:42 -07:00
github-actions[bot]
de325801cf Version Packages (#4980)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-29 19:40:45 -07:00
Eric Meier
6afa9f6a71 Unset isComposing on keydown with isCompsing false (#4979) 2022-04-29 19:15:49 -07:00
github-actions[bot]
d8da50f761 Version Packages (#4977)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-26 12:26:14 -07:00
github-actions[bot]
d40507d77e Version Packages (#4967)
* Version Packages

* Update packages/slate-react/CHANGELOG.md

typo

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
2022-04-25 22:28:45 -07:00
Eric Meier
a4536e2aa2 Fix triple click handling in nested blocks (#4965) 2022-04-25 18:33:59 -07:00
github-actions[bot]
15e11f87e9 Version Packages (#4958)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-21 08:25:46 -07:00
Eric Meier
c1e3fbaab9 Don't treat events with non-selection target range as native (#4957) 2022-04-20 14:47:38 -07:00
github-actions[bot]
f362cd7a19 Version Packages (#4953)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-19 13:10:05 -07:00
Eric Meier
5b51e87d51 fix double insert in anchor element decorations (#4951) 2022-04-19 13:02:23 -07:00
github-actions[bot]
0e606f03c1 Version Packages (#4949)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-18 20:45:50 -07:00
Eric Meier
9957c21435 Prevent native insert at the end of anchors (#4948)
* Prevent native insert at the end of anchors

* add changeset
2022-04-18 09:39:45 -07:00
github-actions[bot]
5160efeea4 Version Packages (#4935)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-13 11:14:29 -07:00
Eric Meier
486c385bc5 Fix editor root tripple click crash (#4944) 2022-04-13 10:58:12 -07:00
Shira Smith
076ab9a67a Fixed legacy check for Firefox v100+ (#4926) 2022-04-11 06:11:16 -07:00
github-actions[bot]
4df23c6e41 Version Packages (#4921)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-03 10:02:04 -07:00
yongzs
aff67312cb Fixed Triple click selection and copy&paste in read-only mode (#4914)
* Fixed Triple click selection and copy&paste in read-only mode

* Create khaki-candles-serve.md

* Update editable.tsx

make sense

* fixed 3871

* Update .changeset/khaki-candles-serve.md

* Update .changeset/khaki-candles-serve.md

Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
2022-04-03 09:09:03 -07:00
Adrien Wald
f6b7ca1f97 Run <Slate />'s focus event listeners after <Editable />'s focus handlers in React >= 17 (#4920)
* use focusin and focusout without capture if react >= 17

See https://github.com/facebook/react/pull/19186 for details on changes to `onFocus` and `onBlur`

* more accurate name for react version check const

* add changeset

* add comment about react >= 17 focus event listeners
2022-04-03 09:08:25 -07:00
Eric Meier
9892cf0ffb Make onChange prop optional, update examples and docs to treat slate as uncontrolled (#4922)
* Make onChange prop optional, update examples and docs to treat slate as uncontrolled

* Add changeset
2022-04-03 08:52:32 -07:00
Eric Meier
08d5a12c91 Call keyDown handler while composing (#4923) 2022-04-03 08:44:46 -07:00
Eric Meier
7de7cdcf56 Restore user selection after beforeinput with target range (#4919)
* Restore user selection after beforeinput with target range

* Add changeset
2022-03-31 04:18:23 -07:00
github-actions[bot]
ce63a08c8e Version Packages (#4898)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-03-25 01:03:44 +00:00
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
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