ianstormtaylor/slate
 Watch   
 Star   
 Fork   
13 days ago
slate

slate-react@0.147.6

Patch Changes

  • #6364 6f00413 Thanks @dannelundqvist! - Copy and cut now use the selection the user just made. Selection changes reach editor.selection a little later than they happen, and copy and cut wrote the clipboard from editor.selection, so a copy straight after selecting, such as Ctrl+A followed at once by Ctrl+C, could copy the previous selection or nothing at all. Copy and cut now process any pending selection change first, before an onCopy or onCut handler runs.
27 days ago
slate

slate-react@0.147.5

Patch Changes

  • #6358 a25994b Thanks @dylans! - On Android, a keyboard correction whose target range points outside the editor now replaces the word before the caret instead of inserting the corrected word after it
29 days ago
slate

slate@0.147.4

Patch Changes

  • #6351 18de0a4 Thanks @dylans! - editor.insertText with an explicit at now inserts there when the editor has no selection, and no longer applies or clears pending editor.marks, which belong to the selection.

  • #6349 5939eb4 Thanks @Marve10s! - Forward options from Editor.insertText and Editor.insertNode to the corresponding editor methods. Explicit insertion locations and other supported options now take effect instead of being silently ignored.

2026-10-22 11:41:53
slate

slate-dom@0.147.3

Patch Changes

  • #6346 b34e312 Thanks @dylans! - On Android, toSlatePoint no longer throws TypeError reading hasAttribute of null when the DOM point is in a text node the keyboard has detached. It returns null with suppressThrow, and otherwise throws the usual "Cannot resolve a Slate point" error. Seen with Firefox for Android while accepting a keyboard suggestion in a new paragraph (#6343).
2026-10-22 11:41:53
slate

slate-react@0.147.3

Patch Changes

  • #6346 b34e312 Thanks @dylans! - Firefox for Android no longer splits a word across blocks when a keyboard suggestion is accepted in an empty paragraph. Firefox commits the word as one insertText per character at offsets it computed first; once the first character re-rendered the empty leaf, the rest of the word went into the next block. A character that arrives within 25 ms of the previous one and targets somewhere other than the editor's selection is now inserted at the selection instead (#6343).
2026-10-22 02:30:23
slate

slate-react@0.147.2

Patch Changes

  • #6344 18f1927 Thanks @dylans! - Chrome's Writing Direction menu command no longer breaks the editor. The command changes the DOM without a beforeinput event, wrapping text in a direction span, so React later threw NotFoundError on removeChild and the editor unmounted. Slate now undoes the DOM changes of any format* input it was not asked to handle first and keeps the selection.
2026-10-20 23:54:57
slate

slate-react@0.147.1

Patch Changes

  • #6340 ca37117 Thanks @dylans! - Report an element whose renderElement didn't render its children through editor.onDOMError when it mounts, naming the element's type and path. Before, nothing was reported, and lookups into the element returned null with no hint why.
2026-10-20 22:32:30
slate

slate-react@0.147.0

Minor Changes

  • #6338 6c4cab5 Thanks @dylans! - Add resolveDOMNode, resolveSlateNode, resolveSlatePoint and resolveSlateRange, which return null instead of throwing, like resolveDOMPoint and resolveDOMRange. Unlike suppressThrow: true, resolveSlatePoint and resolveSlateRange also return null before Editable mounts and for a selection with no range. The to lookups and suppressThrow are unchanged.
2026-10-20 22:32:30
slate

slate-dom@0.147.0

Minor Changes

  • #6338 6c4cab5 Thanks @dylans! - Add resolveDOMNode, resolveSlateNode, resolveSlatePoint and resolveSlateRange, which return null instead of throwing, like resolveDOMPoint and resolveDOMRange. Unlike suppressThrow: true, resolveSlatePoint and resolveSlateRange also return null before Editable mounts and for a selection with no range. The to lookups and suppressThrow are unchanged.
2026-10-19 12:08:43
slate

slate-dom@0.146.1

Patch Changes

  • #6334 0f99057 Thanks @dylans! - resolveDOMPoint and resolveDOMRange no longer report a miss through editor.onDOMError. A miss is often ordinary: a layout effect that measures the selection runs before the edited text's DOM is attached, and replacing editor.children can leave the selection past the end of the new text, so these were reported as broken rendering when nothing was wrong. Slate no longer calls editor.onDOMError itself; the hook stays for apps and plugins.

    resolveDOMRange also returns null instead of throwing when the editor's window isn't registered yet, for example from a layout effect inside the first render, and checks the focus only when the anchor resolves. Scrolling the selection into view no longer throws when the unhung range ends in an element that doesn't render its children.