npm / slate
slate
What changed in slate 0.123 to 0.144, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.
13 breaking1 security34 new APIs and options3 performance3 behavior and defaults28 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initslate 0.1446 changes
Breaking changes 2
BaseEditor now requires setChildren; createEditor supplies it, while hand-built editors and test mocks must add it.
Deleting beside two non-selectable blocks, or a read-only block whose content is all non-selectable, now removes them instead of merging their text.
New APIs and options 1
Applies an outside document through Slate operations, keeping unchanged nodes and preserving selection, refs and history.
Behavior and default changes 1
With history enabled, each setChildren call is recorded as one undo step, separate from typing before and after it.
Fixes and other changes 2
No longer returns points inside consecutive non-selectable elements or inside a non-selectable first child of a void or read-only element.
No longer returns points inside consecutive non-selectable elements or inside a non-selectable first child of a void or read-only element.
slate 0.1431 changes
New APIs and options 1
Adds editor.getSplitProperties(node, path) to choose properties copied to the new right-hand node by Transforms.splitNodes; createEditor supplies it, while structural editor implementations and mocks must add the method.
slate 0.1422 changes
New APIs and options 1
createEditor accepts an optional type parameter; createEditor<BaseEditor>() returns a plain BaseEditor, so plugin chains are type-checked against the plugins actually applied.
Fixes and other changes 1
Opt-in edge affinity leaves collapsed selections outside text nodes to the transform, avoiding a “Cannot get the leaf node” error.
slate 0.1417 changes
Breaking changes 2
Dropping a dragged block void onto the middle of a paragraph now splits the paragraph in the same way as pasting a block-level node.
Pasting block-level nodes mid-block now splits the block so the nodes land between its halves, and moves the cursor to the start of the second half.
New APIs and options 4
Adds a query for consistent insertion at inline and mark boundaries; BaseEditor requires it, while createEditor supplies it automatically.
Adds an opt-in editor hook that configures insertion affinity at inline boundaries; it defaults to null, preserving existing behavior.
Adds a filter option called for each fragment node with the destination block entry; returning false skips that node.
Adds an opt-in editor hook that configures insertion affinity at leaf boundaries; it defaults to null, preserving existing behavior.
Fixes and other changes 1
Reports the receiving leaf’s marks when affinity rules determine the insertion point.
slate 0.1402 changes
Breaking changes 1
An invalid call combining block children with text or inline children now throws with both node paths instead of allowing normalization to discard content.
Fixes and other changes 1
When fragment replacement leaves an insertion point at a block-leading or trailing inline, the required empty text is inserted so insertion stays within the block before emptied containers normalize.
slate 0.1394 changes
New APIs and options 2
Adds an API for identifying remote changes, alongside inward affinity support for expanded selections during remote operations.
Adds a way for bindings to apply remote operations with inward affinity for expanded selections, keeping text inserted at selection edges outside the selected content.
Fixes and other changes 2
Includes text boundaries after inline voids in position traversal and restarts word segmentation there, aligning positions with Editor.before and Editor.after.
When deleting an expanded target before inserting a fragment, honors voids: true and inserts at the surviving start point if the range ends inside an inline element.
slate 0.13814 changes
Breaking changes 2
Hanging selections and native triple-click selections delete whole blocks only at the top level; nested blocks keep the previous behavior.
Removes wholly selected sibling blocks when a selection starts at the start of a block and ends at the start of a later sibling; ranges inside editor.isIsolated elements retain the previous behavior.
New APIs and options 9
Accepts isWordCharacter for custom boundaries when unit is 'word', matching the callback supported by Editor.word.
Accepts isWordCharacter for custom boundaries when unit is 'word', matching the callback supported by Editor.word.
Accepts isWordCharacter for custom boundaries when unit is 'word', matching the callback supported by Editor.word.
Supports select; explicit true moves the caret to the result even with an explicit at, and insertion selects by default when at is omitted.
Supports select; explicit true moves the caret to the result, while the default preserves a null selection. Use true to create a caret after inserting into an unfocused document.
Supports select; explicit true moves the caret to the result, while moving retains its existing selection-following behavior by default.
Supports select; explicit true moves the caret to the result, while moving retains its existing selection-following behavior by default.
Supports select; explicit true moves the caret to the result even with an explicit at, and splitting selects by default when at is omitted.
Adds ignore to exclude selected top-level properties from comparison, independently of the existing loose option.
Performance 1
Restores faster loose comparisons when
ignoreis not set, avoiding the slowdown introduced in 0.138.0.
Fixes and other changes 2
When an
applyoverride changes inserted text, the selection follows the operation by default, andselect: trueselects the end of the text actually applied.After undoing a whole-block deletion, the default behavior scrolls to the restored text instead of the start of the following block.
slate 0.1372 changes
New APIs and options 2
The editor.setNodes type now accepts the replace option.
Transforms.setNodes and editor.setNodes accept a function to compute properties per matched node.
slate 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 1
The 'word' unit for deletion, movement, and Editor.before/after/positions uses Intl.Segmenter where available, so Chinese, Japanese, and Thai text without spaces is handled one word at a time.
Fixes and other changes 1
Includes text an input method is still composing.
slate 0.1352 changes
New APIs and options 2
Identifies isolated elements whose edges prevent Backspace, Delete, range deletion, and insertBreak from merging or splitting across them.
The replace option removes every property not in props in the same operation, preventing old node properties from carrying over when changing type; undo restores them.
slate 0.1346 changes
New APIs and options 3
Adds Editor.hasRange to core; DOMEditor.hasRange and ReactEditor.hasRange use it, falling back to the path check with older Slate versions.
Path, point, and range refs support Symbol.dispose so using declarations can release tracked locations automatically. TypeScript consumers need TypeScript 5.2 or later with esnext.disposable in lib, or skipLibCheck.
Adds a height option to lift matched nodes through multiple ancestors.
Performance 1
Tree-altering operations are faster by using faster array functions when copying and replacing children.
Fixes and other changes 2
Unwrapping nodes with split: true respects partial inline selections and preserves unselected portions of the inline.
Errors now include the next dirty path to help locate normalizeNode logic that keeps a node invalid.
slate 0.1334 changes
Fixes and other changes 4
Keeps unselected text outside an inline wrapper when wrapNodes splits a selection across an existing inline boundary.
Preserves selection endpoints at the end of the document when inserting fragments, so pasting over select-all removes trailing voids and empty paragraphs.
Keeps a valid insertion point when replacing a selection whose end node is removed, including when that node is read-only.
Keeps a valid insertion point when replacing a selection whose end node is removed, including when that node is a void node.
slate 0.1322 changes
New APIs and options 1
Adds a method that returns whether a range is forward, backward, or collapsed.
Fixes and other changes 1
Fixes the PropsMerge type so the merge option can return scalar property values, not just objects.
slate 0.1315 changes
Breaking changes 2
Transforms.unwrapNodes now unhangs a range by default; pass hanging: true to preserve the old behavior.
Transforms.wrapNodes now unhangs a range by default; pass hanging: true to preserve the old behavior.
Fixes and other changes 3
Backspace at the start of a block following a list or table no longer pulls that block into the list or table.
Fixes inserting a fragment into an editor whose only block is empty, which previously left an extra untyped empty block before the inserted content.
An explicit at path no longer causes a programmatic delete to refill the editor with an untyped empty block.
slate 0.1302 changes
Breaking changes 1
Deleting the editor’s only node now leaves an empty block, so the editor retains a start point for focusing or typing.
Performance 1
Only walks the top-level blocks covered by the range, so copying or cutting in a large document no longer takes time proportional to the whole document.
slate 0.1292 changes
Breaking changes 1
Deleting a character or word now removes the empty block and selects the void, instead of deleting the void.
Fixes and other changes 1
Deleting a single character next to, or inside, an empty non-void inline now removes the inline instead of skipping over it and deleting the character on its other side.
slate 0.1283 changes
Breaking changes 1
In Chrome and Safari, pressing Delete on a selected void now deletes forward instead of backward.
Fixes and other changes 2
The type signature now allows non-Range properties of Selections; functionality is unchanged.
Deleting a void backward from a cursor inside it places the cursor before the removed void; in Chrome and Safari, Delete on a selected void deletes forward.
slate 0.1264 changes
New APIs and options 1
Its types now allow setting optional node properties to null, which unsets them.
Behavior and default changes 1
Its types now allow setting optional node properties to null, which unsets them.
Fixes and other changes 2
Nested data structures inside array properties on nodes are now deeply compared when merging identical text nodes; previously array items were compared using ===.
Character distance now treats Indic conjunct clusters as a single grapheme, so character-by-character cursor movement no longer stops inside conjuncts.
slate 0.1246 changes
Breaking changes 1
Paths containing strings are no longer allowed when getting nodes.
Security 1
Property accessors are hardened against untrusted keys.
New APIs and options 1
Added a force property to normalizeNode, passed from the normalize method.
Fixes and other changes 3
Corrects the argument type for the compare option.
Corrects the argument type for the merge option.
Fixes normalization hanging when merging text under non-selectable elements.
slate 0.1234 changes
New APIs and options 4
Added as an efficient type discriminator; use it instead of Path.isPath whenever possible.
Added as an efficient type discriminator; use it instead of Point.isPoint whenever possible.
Added as an efficient type discriminator; use it instead of Range.isRange whenever possible.
Added as an efficient type discriminator; use it instead of Span.isSpan whenever possible.