npm / slate-react
slate-react
What changed in slate-react 0.118 to 0.145, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.
10 breaking16 new APIs and options1 performance10 behavior and defaults2 tooling61 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initslate-react 0.1452 changes
New APIs and options 1
Slate accepts a controlled value prop; pass back the exact object from onValueChange to avoid reapplying it. External values are applied while preserving selection and history, and value cannot be combined with initialValue.
Fixes and other changes 1
Pending DOM selection changes are processed before blur, so a selection change just before the editor loses focus reaches editor.selection.
slate-react 0.1424 changes
New APIs and options 4
Adds a DOM point lookup that returns null instead of throwing when the point cannot be resolved.
Adds a DOM range lookup that returns null instead of throwing when the range cannot be resolved.
Adds an event range lookup that returns null instead of throwing when the range cannot be resolved.
Adds an error handler for broken rendering contracts; errors are passed to the browser's reportError by default.
slate-react 0.1417 changes
Breaking changes 1
Requires the two affinity hooks and insertionPoint query; structurally constructed editors and editor mocks must supply them, while createEditor adds them automatically.
New APIs and options 3
Adds a query for consistent insertion at inline and mark boundaries.
Adds an opt-in editor hook for configuring insertion at inline boundaries; it defaults to null, preserving existing behavior.
Adds an opt-in editor hook for configuring insertion at mark boundaries; it defaults to null, preserving existing behavior.
Behavior and default changes 1
Slate React disables native insertion when affinity changes the receiving point, while retaining compatibility with older supported Slate peers that lack the helper.
Fixes and other changes 2
When typing changes receiving leaves, committed Android input uses action reconciliation so a native mutation does not remain rendered in the old leaf.
Implicit text, fragment, and inline-node insertion follows configured affinity rules; Editor.marks reports the receiving leaf’s marks.
slate-react 0.1405 changes
Breaking changes 1
When the browser resolves a drop position outside the editor, dropped data now goes to the current selection, or the document end if there is no selection; internally dragged content stays where it is.
New APIs and options 1
Adds the suppressThrow option; findEventRange returns null when the range cannot be resolved.
Behavior and default changes 1
The editor root exposes the placeholder to assistive technology through aria-placeholder while the placeholder is shown.
Fixes and other changes 2
Keeps the DOM and Slate value in sync when an insertText override rejects native text input, including insertions at decoration boundaries.
The visual placeholder is marked aria-hidden so assistive technology does not read it as content.
slate-react 0.13812 changes
Breaking changes 1
Whole-block deletion of hanging and native triple-click selections is limited to top-level blocks; nested blocks keep the previous behavior, preventing cuts or drags across cells from removing them in editors without editor.isIsolated.
Behavior and default changes 1
Word-navigation shortcuts use native selection boundaries so Option/Ctrl+Arrow respects native punctuation and language boundaries, falling back to Slate's word transform when native movement is unavailable.
Fixes and other changes 10
Optional createHyperscript options explicitly accept undefined, keeping published types compatible with exactOptionalPropertyTypes after the TypeScript 6 upgrade.
When Tab or Shift+Tab focuses Editable, an existing editor selection is restored while browser placement is kept when there is no selection and mouse-based caret placement is preserved.
Read-only editors remain outside the tab order unless tabIndex is provided.
Caller-provided Editable event handlers are called in read-only mode, while Slate's editing behavior is skipped.
Optional Editable options explicitly accept undefined, keeping published types compatible with exactOptionalPropertyTypes after the TypeScript 6 upgrade.
Optional Slate options explicitly accept undefined, keeping published types compatible with exactOptionalPropertyTypes after the TypeScript 6 upgrade.
Optional useSelected options explicitly accept undefined, keeping published types compatible with exactOptionalPropertyTypes after the TypeScript 6 upgrade.
After undoing a whole-block deletion, the default scrollSelectionIntoView scrolls to the restored text instead of the start of the following block.
The browser's native triple-click selection stays outside isolated elements; inside them, triple-click still selects only the current block's contents.
Called when keyboard navigation moves a selection already synchronized with the DOM, including native movement between text lines; custom callbacks can keep the caret clear of sticky headers.
slate-react 0.1364 changes
New APIs and options 2
Returns the range of the word around a point within its block; words can cross mark changes and inline links but stop at voids.
Lets you define your own word characters for word handling.
Behavior and default changes 2
Includes text that an input method is still composing.
Word deletion, movement, and Editor.before/after/positions use Intl.Segmenter where available, so Chinese, Japanese, and Thai text without spaces is handled one word at a time.
slate-react 0.1348 changes
Fixes and other changes 8
Restores the DOM after a deletion that changes nothing, preventing the next composition's text from being removed while typing.
Keeps text composed into a new paragraph when its block type changes or nodes are inserted, moved, or removed before composition ends.
Allows deleting a selected void with Backspace or Delete when composition never ended.
Prevents an Android crash when typing starts in an empty editor as the placeholder appears by avoiding a DOM restore that undoes React's placeholder changes.
Fixes caret movement and interrupted composition when typing on Android immediately after toggling a mark with a collapsed selection.
Removes Chrome's composed-text copy from the previous leaf before inserting text into the selected leaf, preventing duplicate text.
Removes text the browser composes into a selected void element, preventing browser-inserted text from remaining in the void's DOM.
Removes the source void when it is dragged to a new position, preventing duplicate voids when the dragged selection is collapsed.
slate-react 0.13317 changes
Breaking changes 1
Keeps the caret on the new line without adding zero-width characters, while preserving selection offsets and copied text; requires slate-dom 0.133.5 or newer for matching DOM selection mapping.
Performance 1
Text and leaf components no longer re-render every text node in a block when only one changes; they compare the parent properties they use rather than the parent object itself.
Fixes and other changes 15
Moves the caret into an adjacent empty text node when an arrow key leaves an editable inline, so padding does not leave the caret drawn inside the inline.
Scrolls the caret into view when an edit changes the selection even if the DOM selection already matches the editor, including Backspace between empty paragraphs.
The DOM selection is synced before an Editable onClick handler runs, so editor.selection reflects the click rather than the previous selection.
In Chrome and Safari, pressing ArrowUp from the block below moves the caret to the empty last line of a block ending with a newline.
Slate copies initialValue nodes already used by another editor, allowing both Slate components to render and edit independently; requires slate-dom 0.133.6 or newer.
In Chromium, Shift-clicking text extends the selection from a selected void rather than leaving it collapsed in the void.
Deletion overrides are called in WebKit when Backspace at the start or Delete at the end of a document does not emit beforeinput.
An empty block renders right-to-left when its nearest sibling block with text is right-to-left, so a new line after Hebrew or Arabic text starts on the right.
Expanded selections are synced before composition starts, preventing Firefox crashes and replaced text from remaining in the document.
Input, selection, and history events from native contenteditable regions inside non-editable containers no longer affect the surrounding Slate editor; Slate text and event hosts in custom editable islands are preserved.
Reads the DOM selection when a beforeinput event arrives so input after a selection change goes where the caret is, even before the browser fires selectionchange.
Text-node decorations are clipped to the node's range, ignoring decorations for other nodes and using correct offsets for cross-node ranges.
Flush backward text deletions without waiting for another input event, preserve the typing delay when no action is pending, cancel superseded timers, and avoid an extra change notification when restoring unchanged marks.
Restore Chromium's structural DOM changes before applying multiline composition commits, preventing duplicated text while preserving intervening React updates.
Input, paste and drop events dispatched by script are handled again, as in 0.127.1.
slate-react 0.1322 changes
Breaking changes 2
Editable's extra props are now typed as div attributes instead of textarea attributes, so textarea-only props such as rows, cols, maxLength, wrap and value fail to type-check.
The default now scrolls just enough to reveal the caret instead of centering it; pass a custom scrollSelectionIntoView to keep centering.
slate-react 0.1317 changes
Behavior and default changes 2
autoFocus now focuses through ReactEditor.focus, selecting the document start when no selection exists so typing can begin right away.
The prop is optional; when omitted, Slate uses existing editor.children, and throws if they are empty with a hint to pass initialValue={[]} for an empty editor.
Fixes and other changes 5
The caret stays in editor text when the browser moves it to a position Slate cannot represent, preventing typed characters from being inserted twice.
DOM selection changes are ignored while focus is outside the editor, except when it is read-only, preventing Firefox selection movement from jumping the editor selection.
An empty initialValue is loaded as one empty block, giving the editor a place to put the cursor.
A render within the 100 ms selection-change throttle now applies the clicked selection instead of writing the previous selection back to the DOM.
The void spacer is unselectable, preventing a darker band at the edge of selections that include a void element in Chromium.
slate-react 0.1306 changes
Behavior and default changes 1
Drag-and-drop deletes through editor.deleteFragment, like cut does, so plugins that guard deletion apply to both.
Fixes and other changes 5
Dropping text back onto its own selection is now a no-op.
Moving whole lines by dragging or cutting moves top-level blocks as blocks and nested content without its trailing line break, avoiding empty lines and merged containers.
Shift-clicking a void element now extends the selection to it instead of collapsing the selection onto the void.
The default placeholder style adds -webkit-user-select: none so iOS Safari can't partially select placeholder text.
Fixes typed text appearing in reverse order after a soft break at the end of a leaf in Chrome.
slate-react 0.1292 changes
Fixes and other changes 2
Android beforeinput events now resolve against the editor's selection instead of a stale DOM node map, preventing typed characters from being lost before the editor re-renders.
When a different editor is passed to an already mounted <Slate>, the new editor is now initialized from initialValue instead of keeping empty children.
slate-react 0.1283 changes
Breaking changes 3
Input, paste, and drop events dispatched by scripts are ignored, preventing scripts from inserting content without user action.
Deleting a void element backward from a cursor inside it now places the cursor before the removed void instead of in the following node.
In Chrome and Safari, pressing Delete on a selected void now deletes forward instead of backward.
slate-react 0.1272 changes
Tooling 2
Declared @types/lodash (^4.14.0) as an optional peer dependency so consumers can resolve the package's shipped Lodash type declarations.
Declared @types/react (>=18.0.0) as an optional peer dependency so consumers can resolve the package's shipped React type declarations.
slate-react 0.1264 changes
New APIs and options 1
Add suppressThrow to return false instead of throwing when the element can no longer be found in the editor.
Fixes and other changes 3
Composition selection-sync skips Selection.collapseToEnd when the live DOM selection has no ranges, preventing InvalidStateError and editor unmounting.
Fixes IME composition being cancelled on the first character typed into an empty leaf on Android, which left the first character behind as a separate, uncomposed character.
Beforeinput target ranges that point to DOM nodes no longer resolvable to Slate nodes no longer let a findPath error escape and crash the app.
slate-react 0.1252 changes
Fixes and other changes 2
Fixes Firefox contenteditable text input breaking when the editor mounts.
Fixes the caret jumping to the wrong position when the decorate prop changes asynchronously.
slate-react 0.1242 changes
Fixes and other changes 2
Adds the missing RenderTextProps export so developers can import it from slate-react.
Slate component now handles editor updates properly by including editor in the useEffect dependency array.
slate-react 0.1234 changes
New APIs and options 4
Added an efficient type discriminator; use it instead of Path.isPath whenever possible.
Added an efficient type discriminator; use it instead of Point.isPoint whenever possible.
Added an efficient type discriminator; use it instead of Range.isRange whenever possible.
Added an efficient type discriminator; use it instead of Span.isSpan whenever possible.
slate-react 0.1203 changes
Breaking changes 1
Fixes the peer dependency requirement to be >=0.119.0, resolving the containsShadowAware import error.
Behavior and default changes 1
Scrolls to the focus point of expanded selections.
Fixes and other changes 1
Allows onValueChange and onSelectionChange to trigger on the same frame, fixing cases where one callback was not called.
slate-react 0.1191 changes
Fixes and other changes 1
Fixes an editor crash when the editor is placed inside Shadow DOM and the user types on Android.
slate-react 0.1183 changes
Behavior and default changes 1
The Editable component adds translate='no' so its DOM is skipped by translation.
Fixes and other changes 2
Composition events fired from nested input or textarea elements are ignored.
Fixes onValueChange not firing when replacing text after selecting it from right to left.